473,395 Members | 1,815 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

utf-8 to uppercase in Redhat Linux

How can I convert a utf-8 string to uppercase in a Redhat Enterprise 4 server? All cgis are written in C.
Oct 7 '11 #1
1 2387
johny10151981
1,059 1GB
i never did it, but the thing is if it has mixed up both single byte and multibyte character in the same string, then all you have to do

is skip the next sequential characters

here is the code
Expand|Select|Wrap|Line Numbers
  1. for(i=0;i<stringlenth;)
  2. {
  3.  if(c1>=224)
  4.  {
  5.   i=i+3;
  6.  }
  7.  else if(c1>=192)
  8.  {
  9.   i=i+2;
  10.  }
  11.  else
  12.  {
  13.   if(string[i]>='a' && string[i]<='z')
  14.   {
  15.    string[i]=string[i]-('a'-'A');//I forgot the difference;
  16.   }
  17.   i=i+1;
  18.  }
  19.  
  20. }
  21.  
Oct 8 '11 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Dr. Laurence Leff | last post by:
I am having trouble doing the basics with xmlto on Redhat to convert DocBook XML into the various files. I believe the problem is the first line on the files: Here is starter file (notes.xml):...
4
by: Jeff S | last post by:
To make a long story short, let me say I had MySQL working on Windows 98 and everything was fine. Well, I took the big leap and removed all traces of Windows and Microsoft from the computer....
0
by: Leo Jay | last post by:
Dear All, I'd like to install wxPython in my Redhat AS 4, I have downloaded both wxPython-common-gtk2-unicode-2.6.1.0-fc2_py2.4.i386.rpm and wxPython2.6-gtk2-unicode-2.6.1.0-fc2_py2.4.i386.rpm...
14
by: Richard Welty | last post by:
ok, i'm confused. i have two systems. one is redhat 7.1 (a server in colo, reasonably current), the other is 8.0 (my laptop). the server in colo is running postgresql 7.3.2 along with redhat's...
6
by: RC | last post by:
The Subject says its all. We can only get RPM PHP 4, but can't find PHP 5.
11
by: juyi520 | last post by:
Hello, I am new in C in Programming, Where could I find the detail about struct FILE in RedHat Linux ? I have tried to check the stdio.h in /usr/include, but I could not find the
3
by: TonyHa | last post by:
Hello I try to install boost_1_33_1 on RedHat Linux. I have downloaded boost into /user/dtgtools/tmp and I try to install it into /user/dtgtools/packages/boost. I use the following commands:...
1
by: RubyNovice | last post by:
User Community, I just registered on TheScripts.com and I'm looking for help building an intranet for my employer using Ruby on Rails running on RedHat Linux. I'm new to Ruby; I just purchased my...
3
by: muruga | last post by:
Hi to everybody can any one give me suggestions about how to download mysql query browser for redhat linux 9.0 for mysql version 3.23.54. I had tried it by downloading...
0
by: Anna C. Dent | last post by:
srb wrote: $ export DISPLAY=myhost:0.0 and have a functioning X-server on myhost I suspect that LD_LIBRARY_PATH does not contain the directory where libjvm.so resides; such as...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.