Groovy script does not write UTF-8
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-01-2011
03:45 AM
12-01-2011
03:45 AM
Groovy script does not write UTF-8
Hello,
I need to write UTF-8 encoded files from within a Groovy script. This looks as follows:
However the resulting file is in standard ANSI format. Opening it in a hex editor does not show the "magic bytes" 0xEFBBEF.
Regards,
Robert
I need to write UTF-8 encoded files from within a Groovy script. This looks as follows:
def f = new File("C:/temp/test.txt")
f.write("test", "UTF-8")
However the resulting file is in standard ANSI format. Opening it in a hex editor does not show the "magic bytes" 0xEFBBEF.
Regards,
Robert
1 REPLY 1
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-06-2011
07:07 AM
12-06-2011
07:07 AM
Hi Robert,
for strictly groovy-related questions please check out the groovy website (http://groovy.codehaus.org/) and their related forum.
regards!
/Ole
SmartBear Software
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
for strictly groovy-related questions please check out the groovy website (http://groovy.codehaus.org/) and their related forum.
regards!
/Ole
SmartBear Software
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
