Re: question about encoding
- From: Sven Neumann <sven gimp org>
- To: Axel <axel azerty netcourrier com>
- Cc: gtk-list <gtk-list gnome org>
- Subject: Re: question about encoding
- Date: 28 Mar 2003 16:36:06 +0100
Hi,
Axel <axel azerty netcourrier com> writes:
> Yes but imagine there are some people (me , by example) who have
> locales set to "POSIX" and have though files with accentued
> characters, this don' t solve problems.
as I explained to you already, you can't solve this problem
automatically. If all fails, you will have to present the user with a
choice of encodings and have him choose the correct one.
> so I found that :g_io_channel_set_encoding()
> it take in argument the GIOChannel and an encoding, in a string
> so passing "UTF8" set a GIOChannel to UTF8, I d like to pass another
> encoding
you can set the encoding to NULL which will allow you to read in the
file. You still need to know the encoding if you want to do something
with it later.
> but first I need to know what encoding and string to pass to the
> function I can use to set GIOChannel
as I said, use NULL. If you later want to convert to UTF-8, you can
use the GConv API. It is based on iconv and iconv can give you a list
of encodings (which might differ on other systems!). Try this on the
command-line: 'iconv -l'.
Salut, Sven
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]