Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > string again

Reply
Thread Tools

string again

 
 
jiang lei
Guest
Posts: n/a
 
      07-25-2003
Sorry if someone ever posted this question before.

I was wondering if there is a generic solution to string processing, if not
on all, at least on most of the platforms. std::string could've been good if
it can cope with unicode characters. On Linux Redhat 8.0, even
basic_string<wchar_t> will not compile because basic_string::c_str() looks
something like this:

if(nodata)
return "";
else
return data();

The hard-coded zero length string never agrees with a w_char* return type.


The only other thing I can come up with is ICU. It has a unicode string
class and can play all the code page conversion tricks. However, the cost is
much too high because it comes with a 10MB runtime..

Any ideas?

 
Reply With Quote
 
 
 
 
Victor Bazarov
Guest
Posts: n/a
 
      07-25-2003
"jiang lei" <> wrote...
> Sorry if someone ever posted this question before.


Why? What's so bad about posting it again?

> I was wondering if there is a generic solution to string processing, if

not
> on all, at least on most of the platforms. std::string could've been good

if
> it can cope with unicode characters. On Linux Redhat 8.0, even
> basic_string<wchar_t> will not compile because basic_string::c_str() looks
> something like this:
>
> if(nodata)
> return "";
> else
> return data();
>
> The hard-coded zero length string never agrees with a w_char* return type.


You ran into a bad implementation, I believe.

> The only other thing I can come up with is ICU. It has a unicode string
> class and can play all the code page conversion tricks. However, the cost

is
> much too high because it comes with a 10MB runtime..
>
> Any ideas?


About once a month here Nikki Locke posts a short summary and a link to
a page with enormous list of "Available C++ Libraries". You probably want
to search for the last post using http://groups.google.com . I have little
doubt that you can find what you're looking for in that extensive list of
libraries of all sorts.

Victor


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Again??? AGAIN???? NYC XYZ Firefox 4 04-23-2006 12:23 PM
HttpSession gets generated again and again!! PLEASE HELP ME!!!! che Java 2 10-10-2005 10:20 PM
Olympus digicam losing date/time settings again and again TommyC Digital Photography 7 05-31-2004 06:37 PM
jserve booting again and again amit Java 0 10-02-2003 04:26 PM
IMPORTANT! Changes to your Cable Internet Service (again & again) Charlie Computer Support 4 07-17-2003 01:18 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57