Path: csiph.com!x330-a1.tempe.blueboxinc.net!feeder1.hal-mli.net!news.glorb.com!news-out.readnews.com!news-xxxfer.readnews.com!panix!not-for-mail From: ruben safir Newsgroups: comp.lang.c++ Subject: Re: UTF-8 and strings Date: Mon, 13 Jun 2011 04:46:59 +0000 (UTC) Organization: PANIX Public Access Internet and UNIX, NYC Lines: 31 Message-ID: References: <319effb5-bf19-4c21-86e8-e4f1f4350dfc@p21g2000yqh.googlegroups.com> <0aef53d1-a8ce-49aa-b931-2fc3453e1bb6@f2g2000yqh.googlegroups.com> NNTP-Posting-Host: www2.mrbrklyn.com Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Trace: reader1.panix.com 1307940419 19212 96.57.23.82 (13 Jun 2011 04:46:59 GMT) X-Complaints-To: abuse@panix.com NNTP-Posting-Date: Mon, 13 Jun 2011 04:46:59 +0000 (UTC) User-Agent: Pan/0.133 (House of Butterflies) Xref: x330-a1.tempe.blueboxinc.net comp.lang.c++:6672 On Sun, 12 Jun 2011 20:57:38 -0700, John M. Dlugosz wrote: > On Jun 9, 8:41 am, "MikeP" wrote: > > >> But if you KNOW that all you need is what's in the BMP, why not exploit >> that, right? > > Sure, the project is specified to be nationalized into 7 languages, and > they all happen to be serviced by the Latin-1 character set. So you > decide to use 8-bit chars and assume the Windows program is running on a > system that uses code page 1252 as the default for a process. > > Then one day the boss comes in and says that the next version will be > marketed to China as well. > > It is my experience that software projects only get more complex over > time. Plan for it, unless you are planning to be unsuccessful. > > —John Strangely enough, this is a specific problem for a specific kind of app, like a word processor. IT people even in china learn rudimentary English because scanf doesn't translate to Chinese wide chars. If comp sci originally were devised and discovered in china, it would have been a bummer for an 8 bit processor with limited memory, and a limit of 256 chars.