Closed GoogleCodeExporter closed 8 years ago
I'll have a look into what may need to change. You are correct that Ruby
supports UTC-8, however, the version of Ruby running when you run a plugin (ie:
the version of Ruby built into Sketchup), does not! There are a few things that
I am aware of which can be done to try to prevent mangling (using special ways
of handling strings which tries to preserve UTC-8). I'll see if I can find a
way to make this work. I am not the first to have the issue!
Wrt the use of comma as field separators, this is driven by the language
setting in Sketchup. If I detect EN (en-US or en-GB) then I use comma because
'.' is used as the decimal and anything else uses ';' as the field separator
since ',' is used as the decimal. What language setting are you using in
Sketchup?
Original comment by daltx...@gmail.com
on 20 Aug 2013 at 6:10
Great!
I run the English version of Sketchup so Sketchup.get_locale returns EN-US. The
problem is that numbers are printed with a comma since I have that as a
national setting (swedish).
Some hints:
- The html printing in CutList works fine.
- So does printing international characters to files via the Ruby Console.
- $KCODE reports UTF8 in the console.
- File.new, in the console, does not handle international characters in
filenames nor paths.
Regards,
Mikael
Original comment by tho...@gmail.com
on 20 Aug 2013 at 8:21
Well, I put a lot of effort into this and found the source of the issue.
However, there is very little I can do about it. Sketchup supports an older
version of Ruby to run for plugins and this older version cannot open a file as
UTF-16. So, anytime a new file has to be written, the filename will not be set
properly and the UTF-16 characters will be interpreted as UTF-8.
I'll find the right avenue to raise this issue with Trimble. Or keep searching
to see if there is a workaround.
Sorry, I can't do more at this time!
Original comment by daltx...@gmail.com
on 18 Nov 2013 at 7:59
Original issue reported on code.google.com by
tho...@gmail.com
on 20 Aug 2013 at 2:58