From: Andrew R. <aro...@ya...> - 2004-05-19 04:06:41
|
At 07:25 PM 18/05/2004 +0200, you wrote: >In practical terms, we will have to make the functions pllab, plmtex, and >plptex become Unicode-aware. (N.B. : the remaining problem is with plsym, >which retains the semantics of the Hershey encoding.) This should not be >very complicated. For instance, the following call in x03c.c: > plmtex("t", 2.0, 0.5, 0.5, "#frPLplot Example 3 - r(#gh)=3Dsin 5#gh"); > >would become: > > plmtex("t", 2.0, 0.5, 0.5, "#frPLplot Example 3 - r(=CE=B8)=3Dsin= 5=CE=B8"); Flying completely off the top of my head here, but assuming we make those=20 functions unicode aware, there should be no need to add anything in the=20 metafile format - as long as the metafile was being replayed to unicode=20 aware plrender, all should be well. A non unicode plrender would just put a= =20 funny character out instead, which would at least not be fatal. >where the funny sequence of 8-bit characters "=CE=B8" means "the lower-case >greek letter theta". (Just cut & paste the line above, put it into a file >and open the file in a Web browser with character coding set to Unicode and >you will see a nice "theta"; at least, it works with my Mozilla 1.6.) I gotta say, that is very cool trick (and works with IE too); but I think=20 that using the "#g" syntax is easier on the brain. I know which I would be= =20 using ;-). >To prove that it is really simple to use Unicode nowadays, I prepared a C >program using libunicode that decodes the string above. It is attached >below along with its Makefile. If you have the libunicode-dev package >installed (in Debian, at least), just type make and you will see: That is elegance and simplicity ! Can you think of any other issues that might get in the way of adding=20 unicode support ? I think the biggest hurdle would be getting a=20 Hershey/unicode translation table. -Andrew |