Re: [Cppunit-devel] Unicode Support (was: 1.6.0 is released!)
Brought to you by:
blep
From: Michael A. <ch...@mu...> - 2001-09-24 13:04:11
|
Let me see if I understand you correctly. When not changing anything in = CppUnit, you are degrading the strings in CppUnit to be simple = containers which contains "something the TestRunner know what to do = with" - and currently it just happens to be ASCII strings. This might work, but I think it should be reflected in the design then - = f.ex. by letting the TestRunner pass the strings as a pointer to a = subclass of a specific class (or maybe a template parameter class). I personnaly do not like a design where a string is something we use to = stuff something else into and then decode it again - this way doom = lies! You are right __FILE__ are not unicode. Can you use unicode strings in the assert macros the way you have done = it? Yes, unicode use a different runtime library. A while ago you asked me about Unicode programming on unix. I have found = an article about unicode on linux: = http://www-106.ibm.com/developerworks/linux/library/l-linuni.html I now the first Unicode port for windows I did, was not a very good job. = I'll be willing to it right, but I need somebody who understands CppUnit = to talk to about the design. Enjoy. Michael Arnoldus. ----- Original Message -----=20 From: "Baptiste Lepilleur" <gai...@fr...> To: "Cpp Unit Develpment Mailing List" = <cpp...@li...> Sent: Monday, September 24, 2001 1:48 PM Subject: Re: [Cppunit-devel] Unicode Support (was: 1.6.0 is released!) > Quoting Michael Arnoldus <ch...@mu...>: > =20 >=20 > > Unicode support would be nice! >=20 > I've been rethinking Unicode support for CppUnit lately. I actually = wrote the=20 > TestRunner for Qt (which is full Unicode) without having to change = CppUnit. >=20 > It is much easier to move the unicode problem to the TestRunner. The = only=20 > string that need to be handled at that level are: > 1) filename (I don't think __FILE__ can handle unicode filename = anyway) > 2) failure message (might be a problem if you use ASSERT_EQUAL and = only work=20 > with non latin1 string). >=20 > In most case, it should be possible to get around the problem raised = by (2).=20 > Though for some applications it might be tough (Japanese to English = translator=20 > for example). (Note: wouldn't it be possible to encode string using = MBCS and=20 > decode them later to Unicode ?) >=20 > So now the problem would be moved at the TestRunner level, more = specifically,=20 > the MFC TestRunner. > What issue remain ?=20 > - library: does unicode use a different runtime library (I don't = remember,=20 > and don't have the unicode version there) ? > - adaptability: have the test runner compile with/without unicode = support and > convert the string as needed. >=20 > What do you think ? >=20 > Baptiste. >=20 > --- > Baptiste Lepilleur <gai...@fr...> > http://gaiacrtn.free.fr/index.html > Language: English, French >=20 > _______________________________________________ > Cppunit-devel mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppunit-devel >=20 >=20 >=20 |