Re: Optimization of code

Tech-Archive recommends: Speed Up your PC by fixing your registry



It would be interesting if there were a

#pragma strings(unicode)

so that with this pragma
"A"
would be interpreted as the current
L"A"
but then we'd have to add
S"A"
(or choose a letter of your choice) which would be interpreted as the current
"A"

As usual, the problem is gigalines of legacy code.

For that matter, if the editor supports Unicode and the compilers support it, I should be
able to write
int æíöø = ÿê_ólÞè_çûrìôsïtý_shòppë + 1;
(which is silly in the particular, but think of all those alphabets, such as Norwegian,
Swedish, German, French, Hungarian, etc. that use accented characters). We will know we
have true localization when you can take a C program shown with Japanese identifiers,
copy-and-paste it from a document into a program where you've done the same thing with a
German, Korean, and Arabic set of subroutines, and the whole thing compiles and executes
correctly. [When I was Very Young, we had a French graduate student who wrote some of our
code. All his variables and labels used French words. After he left, I had to maintain
it. Fortunately, our project leader was Canadian, so he and I sat down and used the
editor's "Replace" command until we had it in English. So I don't think limited the
character set to American English characters makes code "more readable"). Right now, I
can't put a Lituanian name into a string and see what it really says, because I have to
use \uXXXX to get some character in. I find this less readable than if the native
characters were used.
joe

On Fri, 4 Sep 2009 07:07:20 -0700, "Tom Serface" <tom@xxxxxxxxxxxxx> wrote:

I'm not advocating taking away the ability to do ANSI strings, just the idea
that the default string type should be Unicode (or have the ability to make
it so with a switch). I know this will never happen since it goes way beyond
the standard, but ...

Tom

"r norman" <r_s_norman@xxxxxxxxxxx> wrote in message
news:q242a5hm649m9fl3vi0h7787915emctef2@xxxxxxxxxx
There exist many external devices that programs must communicate with
that require ASCII text strings as part of their protocol. Often
these have to be parsed for processing and character-by-character
manipulation alone would be a terrible burden. I can easily accept
switching to Unicode for all processes contained purely within the
local machine but it would be a disaster to lose ANSI support
altogether.
Joseph M. Newcomer [MVP]
email: newcomer@xxxxxxxxxxxx
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
.



Relevant Pages

  • Character encodings
    ... I'm looking for an easy way to remove french characters and replace them ... with their english equivalent. ... French String: Jôêl ... English String: J??l ...
    (comp.lang.java.help)
  • Re: Optimization of code
    ... Since CString can convert back and forth it would be nice to have an override that could take either kind of format string, but still return the intended "formatted" string. ... For that matter, if the editor supports Unicode and the compilers support it, I should be ... Swedish, German, French, Hungarian, etc. that use accented characters). ...
    (microsoft.public.vc.mfc)
  • Re: [FR/EN] how to remove the characters -
    ... [french version snipped] ... Those characters don't appear in the string below. ... "Reply" at the bottom of the article headers. ...
    (comp.lang.perl.misc)
  • French characters in query string
    ... How can I convert an url encoded string containing some french ... to obtain the original string but with no success. ... "name=Nol Pirs" and the special french characters are omitted. ...
    (microsoft.public.dotnet.general)
  • Re: How to convert Infix notation to postfix notation
    ... If this is for an error message, why isn't it using stderr for its output? ... array of 15 characters, and you call this function with the limit 15 on ... Making sure that the only string I allocate and append to, ... because mulFactor in all versions must needs incorporate the functions ...
    (comp.lang.c)