Using OpenBSD 4.0 release:

An IDE that I am trying to maintain for OpenBSD has been recently internationalized and is using the following line with 'iconv':

x = iconv_open ("UTF-8",nl_langinfo(CODESET));

On all other platforms that are supported, 'nl_langinfo (CODESET)' returns a string that cites a standard in a form that can be directly understood by iconv. OpenBSD returns the string "646" as a reference to iso646. Unfortunately, 'iconv -l' only knows the following names for this standard:

ANSI_X3.4-1968 ANSI_X3.4-1986 ASCII CP367 IBM367 ISO-IR-6 ISO646-US ISO_646.IRV:1991 US US-ASCII CSASCII

My questions:
- Is there a specific reason why nl_langinfo(CODESET) is so brief with the codeset
  cited ?
- Would it be possible to solve this problem for me on the OpenBSD side by either
  adapting nl_langinfo or adding '646' to the iconv package ?
- Are there any suggestions on how I can solve this problem in a universal way, i.e. that does not make use of manual converting '646' to 'ISO646-US' or similar ? (perhaps references to other functions that print the codeset in a more usabel way)

Any help would be appreciated,
Regards,
Bernd

Reply via email to