List Info

Thread: Re: UTF-8 issues




Re: UTF-8 issues
country flaguser name
France
2007-04-18 04:12:37
> Output methods:
> i) Passing the string to Flash, it displays correctly.

Yes.

> ii) If I do a trace() from Neko, there's garbage on the
console (two
> wrong characters embedded instead of the correct one).
(not a big
> problem, and expected behaviour)

Yes, this is expected and the character should display
correctly if your
console is set to UTF8.

> iii) If I do a systools.Dialog.message() from Neko,
there's a
> different wrong two characters embedded. (again, not a
big problem and
> expected behaviour)

Yes, the current systools methods are using native OS
encoding and not UTF8.

> iv) If I write it out to a file (using File/FileOutput
in binary or
> text mode) there are the same wrong two characters as
with
> systools.Dialog.message(). This is clearly a problem.

The problem is with your editor. Looks like its set by
default to
ANSI/ISO and waits for a BOM to switch to UTF8. If you
switch it manualy
to UTF8, you should be able to see the characters.

Again, the problem with string encoding is that you have to
get both the
format and the viewer to agree on the representation. BOM is
one way to
do it, that's not the only one (HTML uses Content-Type
charset for example).

Best,
Nicolas

-- 
haXe - an open source web programming language
http://haxe.org

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )