Author Topic: Korean Locale Issue  (Read 1583 times)

radon88

  • Newbie
  • *
  • Posts: 14
    • View Profile
Korean Locale Issue
« on: January 26, 2005, 11:39:23 pm »
Hi.

I'm a big fan of pdaXrom and now I want to print korean characters in xterm.  

So when  I started xterm like belows,  korean character(double width character) was badly represented with single-width character.  
(-gnu-* font was dragged from ubuntu desktop machine)

Code: [Select]
LANG=ko_KR.UTF-8 xterm -u8 -fn -gnu-unifont-medium-r-normal--16-160-75-75-c-80-iso10646-1
With some curiosity,  I decided to check korean locale support with program below

Code: [Select]
#include
#include
#include

int main(void)
{
time_t now;
struct tm *l_time;
char string[256];

setlocale(LC_TIME, "");
now = time((time_t *)NULL);
l_time = localtime(&now);
strftime(string, sizeof string, "%c", l_time);
printf("%s\n", string);

return 0;
}

But failed.  

Code: [Select]
LANG=ko ./localetester
LANG=ko_KR.UTF-8 ./localetester
LC_CTIME=ko ./localetester
LC_CTIME=ko_KR.UTF-8 ./localetester

All these commands shows C locale style outputs not korean locale.  
Code: [Select]
Wed Sep 17 01:44:38 2003
So, anyone teach me how to print korean characters correctly.

Help from Japanese and Chinese users will be very appreciated.  

Thanks for help in advance.

PS. sorry for bad english
« Last Edit: January 26, 2005, 11:45:18 pm by radon88 »