[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [LOCALE] UTF-8 er noget værre slam



Keld Jørn Simonsen <sslug@sslug> writes:

> Hvordan så med behandling af strenge, hvor der indgår strengkonstanter?
>
> fx noget ala strcmp(str,"rødgrød")
> vil der være konvertering on the fly? Givet at strenge internt behandles
> i ucs-2, og konstanterne i utf-8?

Jeg må indrømme at jeg ikke kender detaljerne. Hvis jeg husker ret, er
alle strenge erklæret med String-klassen faktisk konstante, man kan
ikke ændre i dem som man kan med en "char *":

  http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html

Jeg ved ikke om en implementering vil udnytte dette til at opbevare
indeholdet af alle String-objekter i UTF-8 og undlade at konvertere
til UCS-2 medmindre det er nødvendigt, som det f.eks. ville være hvis
man skulle sammenligne med et tegnarray, char[] hedder det vist i
Java. En mulighed var at kigge i kildekoden til gcj eller Classpath.

-- 
Ole Laursen
http://www.cs.aau.dk/~olau/


 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 20:55 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *