Re: About the charset and unicode manipulation functions
- From: Matthias Clasen <mclasen redhat com>
- To: "Qiu, Michael" <michael qiu intel com>
- Cc: gtk-devel-list gnome org
- Subject: Re: About the charset and unicode manipulation functions
- Date: Thu, 15 Dec 2005 21:35:30 -0500
On Fri, 2005-12-16 at 07:39 +0800, Qiu, Michael wrote:
> I’m working on LSB-desktop working group.
>
> I’m responsible for glib test cases development. I encounter some
> problems about the Charset and Unicode manipulation.
>
> I develop some test cases for the functions g_locale_from_utf8 and
> g_utf8_collate. For these two functions, I use the zh_CN.GB2312
> encoding.
>
> But, when I test these cases on Mandriva and Ubuntu, I find I have
> to install this encoding first, or else the results are failing.
>
> Could you please tell me which methods I can use to make these test
> cases independent on the locale?
>
> The attachments are the snippet from the test suite.
>
It is hard to test locale-dependent functions without relying on
installed locales... the GLib unit tests have the same problem.
You can consult the existing unit tests for g_utf8_collate() and
g_convert() in tests/unicode-collate.c and tests/convert-test.c
Matthias
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]