[haiku-bugs] [Haiku] #12303: nl_langinfo(CODESET) seems to always return US-ASCII whatever environment values

  • From: "oco" <trac@xxxxxxxxxxxx>
  • Date: Fri, 14 Aug 2015 15:53:51 -0000

#12303: nl_langinfo(CODESET) seems to always return US-ASCII whatever
environment
values
--------------------------+------------------------------
Reporter: oco | Owner: nobody
Type: bug | Status: new
Priority: low | Milestone: Unscheduled
Component: System/POSIX | Version: R1/Development
Keywords: | Blocked By:
Blocking: | Has a Patch: 0
Platform: All |
--------------------------+------------------------------
My guess is that under Haiku, this function should return UTF-8.

I found a discussion about this in the haikuport mailling list :
http://comments.gmane.org/gmane.os.haiku.ports.devel/1154.

But it is not clear for me what need to be done (or if there is something
to do). Maybe, it is not worth the time.

Here is a sample program to test this function :

#include <stdio.h>
#include <langinfo.h>

main()
{
printf("%s\n", nl_langinfo(CODESET));
}

Here is a sample run :

/boot/src/fpc/tests> printenv LC_TYPE
en_US.UTF-8
/boot/src/fpc/tests> nl_lang_info
US-ASCII

--
Ticket URL: <https://dev.haiku-os.org/ticket/12303>
Haiku <https://dev.haiku-os.org>
Haiku - the operating system.

Other related posts: