Arc Forumnew | comments | leaders | submitlogin
where does Unicode break?
4 points by treef 6172 days ago | 3 comments
I think i am missing some thing here is what i test with: http://dpaste.com/33162/ where will unicode break?


3 points by olavk 6166 days ago | link

Unicode breaks in the hello-world webapp. E.g. if you write

   (defop hello req (pr "hello world \u1234"))
You get some strange looking text in you browsers. This seem to be because arc is generating UTF-8 output (which I think is MzScheme default) but not declaring the encoding, which will make most browsers default to interpret it as iso8859-1. It seem to be fixed by changing svr.asc line 105 to

    Content-Type: text/html;charset=utf-8

-----

1 point by olavk 6171 days ago | link

It works on account of Arc using the underlying MzScheme string implementation. Since this is incidental to the host and not part of the arc spec (arc.arc), it is not guaranteed to keep working.

A patch to support unicode (which PG has asked for) would have to include a "native" implementation of strings in Arc, which is a rather fundamental extension to the language, and I suspect the language designers would want to do this themselves? Or would you (the Arc language designers, if you read this) accept such a patch?

-----

1 point by starc 6172 days ago | link

That's a very good question. I suspect the answer may vary from version to version of mzscheme.

To those asking for explicit Unicode support: why not write a test suite for Unicode? Then we will all know what works, and what doesn't.

People are already publishing patches for arc. If potential developers knew about Unicode issues, it would give them a place to get started.

-----