|
From: Petr M. <mi...@ph...> - 2006-10-15 20:09:37
|
> This weekend I decided to sit down and try to understand how utf-8 > encoded works. Afterwards I modified the svg terminal driver > to re-encode utf-8 strings as escaped Unicode hex constants. This > makes it work properly on my machine using either firefox or > konqueror, whereas without re-encoding it worked only partially. I've tried it with a Czech text like =09P=F8=EDli=B9 =BElu=BBou=E8k=FD k=F9=F2 =FAp=ECl =EF=E1belsk=E9 =F3dy. It works with "set encoding default" and the text written in UTF-8. For "se= t=20 encoding iso8859_2" and the text in that encoding, it gets displayed wrong.= =20 So you reencoding is wrong. And, how is it supposed to work on Windows=20 with cp1250 encoding? I think your patch should work only for the default encoding or "set=20 encoding utf8" (to be added), otherwise it should not do any &#xxxx;=20 changes. Well, I wonder why it is not enough to have <?xml version=3D"1.0" encoding=3D"utf-8" standalone=3D"no"?> <?xml version=3D"1.0" encoding=3D"iso-8859-2" standalone=3D"no"?> as the first line of the output file? Why it does not work for you and=20 UTF-8? If I do so, and having Czech text in those encodings, the text=20 appears correctly in both Firefox 1.5.0.7 and Konqueror 3.5.2. Thus, I don't see any advantage of the reencoding. I prefer to keep the tex= t=20 as-written. If you need it, then I propose to force it by an option to "set term svg". --- PM |