The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > OS Specific Forums > Linux
Google UNIX.COM


Linux RedHat, Ubuntu, SUSE, Fedora, Debian, Mandriva, Slackware, Gentoo linux, PCLinuxOS. All Linux questions here!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Chinese characters in Vi editor chrisanto_2000 Filesystems, Disks and Memory 4 01-29-2007 06:39 PM
chinese problem jack_ty_chan UNIX for Dummies Questions & Answers 0 06-21-2006 08:31 PM
Chinese characters on Sol 2.7 Hayez SUN Solaris 1 01-29-2006 09:34 PM
Printing Chinese postscript file Albert J. UNIX for Dummies Questions & Answers 0 05-19-2005 08:33 PM
Printing chinese from solaris 9 MizzGail UNIX for Dummies Questions & Answers 1 05-19-2005 09:18 AM

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-15-2006
Registered User
 

Join Date: Jan 2006
Posts: 35
lex for Chinese character

Hi,
I need to read one chinese char using lex. I tried using "." ( period ) for pattern matching but in vain.
Could anyone suggest me how do i proceeed.
Sample pgm: to read a chinese char in single quotes.
%{
#include <locale.h>
%}
%%
\'.\' printf("SUCCESS\n");
. printf("Failed\n");
}
%%
main()
{
setlocale(LC_ALL,"");
yylex();
}
This always prints me "Failed" message. I cannot use '.+' for matching for my application.
I can view the chinese char with locale settings on my machine. I am using linux machine . Locale set is : zh_CN.utf8.

Thank You
Reply With Quote
Google UNIX.COM
Forum Sponsor
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 08:59 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0