international character string works as string argument but not inparser

Willem J. Atsma willem.atsma at victhom.com
Tue Nov 11 10:25:03 CST 2008


Thanks for the rapid reply. Here are some examples:


----------------------------------------------------------------------
octave:1>data_index.('Québec') = 1
data_index =
{
  Québec =  1
}
octave:2>fieldnames(data_index)
ans =

{
  [1,1] = Québec
}
----------------------------------------------------------------------

So the accented character is preserved. Everything seems to work. It only gives trouble when 
going through the commandline directly. 


Thanks!

Willem




-----Original Message-----
From: John W. Eaton [mailto:jwe at bevo.che.wisc.edu] 
Sent: Tuesday, November 11, 2008 10:44 AM
To: Willem J. Atsma
Cc: bug-octave at cae.wisc.edu
Subject: international character string works as string argument but not inparser

On 11-Nov-2008, Willem J. Atsma wrote:

| Hi all,
| 
| This may be specific to the installation I have: windows XP, version 
| 3.0.1 (fr octave-forge)
| 
| I get the following error:
| 
| 
| ----------------------------------------------------------------------
| ----
| octave:40>data_index.Québec
| error: invalid character `é' (ASCII 233) near line 40, column 26 parse 
| error:
| 
| >>> data_index.Québec
|                  ^
| ----------------------------------------------------------------------
| ----
| 
| When I use the field name like a list index it works:
| 
| ----------------------------------------------------------------------
| ----
| octave:41>data_index.('Québec')

That doesn't work for me.  I see

  octave:1> data_index.('Qu?bec') = 1
  error: invalid structure field name `Qu?bec'

After doing something like

  data_index.('Québec') = 1;

what does

  data_index

or

  fieldnames (data_index)

show you?  Is the é in the field name preserved?

| Assuming that the string is handled elsewhere in the code depending on 
| how it is passed, I guess the parser does not support characters 
| outside the 0-127 range?

Yes, Octave is not yet 8-bit clean.  It will take a lot of work to make it 8-bit clean, so I consider this a "probably won't fix for quite some time" bug.

jwe

--
Click here to report this message as spam. 
http://gateway.victhom.com/cgi-bin/learn-msg.cgi?id=1A047282EC.1D560 
  
Confidentiality Warning:  
This message and any associated files are intended only for the use of the intended recipient(s), are confidential, and may be privileged. If you are not the intended recipient, you are hereby notified that any review, retransmission, conversion to hard copy, copying, dissemination or other use of this message and any attachments is strictly prohibited. If you are not the intended recipient, please notify the sender immediately by return e-mail, and delete this message and any attachments from your system. Thank you.  
 
Information confidentielle: 
Le présent message, ainsi que tout fichier qui y est joint, est envoyé à l'intention exclusive de son ou de ses destinataires; il est de nature confidentielle et peut constituer une information privilégiée. Nous avertissons toute personne autre que le destinataire prévu que tout examen, réacheminement, impression, copie, distribution ou autre utilisation de ce message et de tout fichier qui y est joint est strictement interdit. Si vous n'êtes pas le destinataire désigné, veuillez en aviser immédiatement l'expéditeur par retour de courriel et supprimer ce message et tout document joint de votre système. Merci. 
 



More information about the Bug-octave mailing list