<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
{mso-style-priority:99;
mso-style-link:"Texte de bulles Car";
margin:0cm;
margin-bottom:.0001pt;
font-size:8.0pt;
font-family:"Tahoma","sans-serif";
mso-fareast-language:EN-US;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri","sans-serif";
color:windowtext;}
span.TextedebullesCar
{mso-style-name:"Texte de bulles Car";
mso-style-priority:99;
mso-style-link:"Texte de bulles";
font-family:"Tahoma","sans-serif";}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri","sans-serif";
mso-fareast-language:EN-US;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="FR" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal">Bonjour,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">J’ai un problème de traitement de caractères accentués.<o:p></o:p></p>
<p class="MsoNormal">Je dois séparer de l’adresse d’un fichier le chemin menant à son répertoire et le nom du fichier. Pour cela j’ai écrit le code suivant :<o:p></o:p></p>
<p class="MsoNormal" style="text-indent:35.4pt">ouvrir = uigetfile(["*.txt"],"","Choix du fichier des mesures");<o:p></o:p></p>
<p class="MsoNormal" style="text-indent:35.4pt">texte = asciimat(ouvrir);<o:p></o:p></p>
<p class="MsoNormal" style="text-indent:35.4pt">chemin = char(texte(1:max(strindex(ouvrir,'\'))));<o:p></o:p></p>
<p class="MsoNormal" style="text-indent:35.4pt">fichier = char(texte(max(strindex(ouvrir,'\'))+1:size((texte),2)));<o:p></o:p></p>
<p class="MsoNormal">qui ne pose pas de problème tant qu’il n’y a pas de caractères accentués dans l’adresse.<o:p></o:p></p>
<p class="MsoNormal">Par exemple avec<o:p></o:p></p>
<p class="MsoNormal" style="text-indent:35.4pt">ouvrir = 'D:\force\sensorPOS1.txt';<o:p></o:p></p>
<p class="MsoNormal">j’obtiens bien <o:p></o:p></p>
<p class="MsoNormal" style="text-indent:35.4pt">chemin = <o:p></o:p></p>
<p class="MsoNormal" style="text-indent:35.4pt"> D:\force\<o:p></o:p></p>
<p class="MsoNormal">et<o:p></o:p></p>
<p class="MsoNormal" style="text-indent:35.4pt">fichier = <o:p></o:p></p>
<p class="MsoNormal" style="text-indent:35.4pt"> sensorPOS1.txt<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Par contre avec<o:p></o:p></p>
<p class="MsoNormal" style="text-indent:35.4pt">ouvrir = 'D:\accéléro\sensorPOS1.txt';<o:p></o:p></p>
<p class="MsoNormal">il y a un décalage et j’obtiens<o:p></o:p></p>
<p class="MsoNormal" style="text-indent:35.4pt">chemin = <o:p></o:p></p>
<p class="MsoNormal" style="text-indent:35.4pt"> D:\accélér<o:p></o:p></p>
<p class="MsoNormal">et<o:p></o:p></p>
<p class="MsoNormal" style="text-indent:35.4pt">fichier = <o:p></o:p></p>
<p class="MsoNormal" style="text-indent:35.4pt"> o\sensorFBG1.txt<o:p></o:p></p>
<p class="MsoNormal">cela vient du fait que les caractères « é » sont codés à l’aide de 2 caractères :<o:p></o:p></p>
<p class="MsoNormal" style="text-indent:35.4pt">asciimat('é')<o:p></o:p></p>
<p class="MsoNormal" style="text-indent:35.4pt">ans =<o:p></o:p></p>
<p class="MsoNormal" style="text-indent:35.4pt"> 195. 169.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Une idée pour contourner simplement ce problème ?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Bien cordialement,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span style="mso-fareast-language:FR"><o:p> </o:p></span></p>
<p class="MsoNormal" style="background:white"><b><span style="font-size:9.0pt;font-family:"Arial","sans-serif";color:#6E7678;text-transform:uppercase;mso-fareast-language:FR">Philippe VUILLAUME</span></b><b><i><span style="font-size:8.0pt;font-family:"Arial","sans-serif";color:#6E7678;text-transform:uppercase;mso-fareast-language:FR"> </span></i></b><span style="mso-fareast-language:FR"><br>
</span><b><i><span style="font-size:8.0pt;font-family:"Arial","sans-serif";color:gray;mso-fareast-language:FR">Référent Technique / Senior Technical Adviser<br>
</span></i></b><i><span style="font-size:8.0pt;font-family:"Arial","sans-serif";color:gray;mso-fareast-language:FR">Expert scientifique et technique du réseau SNCF - SYNAPSES<br>
</span></i><i><span style="mso-fareast-language:FR"><br>
</span></i><a href="https://sncf.sharepoint.com/sites/Sharepoint-MM-MDI/SitePages/Accueil.aspx" title="https://sncf.sharepoint.com/sites/Sharepoint-MM-MDI/SitePages/Accueil.aspx"><span style="color:blue;mso-fareast-language:FR;text-decoration:none"><img border="0" width="197" height="36" id="Image_x0020_3" src="cid:image001.png@01D4E4BB.8D7DB4B0" alt="cid:695cf711-a912-4220-b0da-a81ba56048c8"></span></a><span style="color:#1F497D;mso-fareast-language:FR">
</span><span style="font-size:12.0pt;font-family:"Times New Roman","serif";color:black;mso-fareast-language:FR"><o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:12.0pt;font-family:"Times New Roman","serif";color:black;mso-fareast-language:FR"><o:p> </o:p></span></p>
<p class="MsoNormal" style="background:white"><b><span style="font-size:8.0pt;font-family:"Arial","sans-serif";color:#6E267B;text-transform:uppercase;mso-fareast-language:FR">SNCF – DIRECTION DU MATERIEL</span></b><span style="font-size:12.0pt;font-family:"Times New Roman","serif";color:black;mso-fareast-language:FR"><o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:8.0pt;font-family:"Arial","sans-serif";color:#6E267B;text-transform:uppercase;mso-fareast-language:FR">INGÉNIERIE DU MATÉRIEL - AGENCE D’ESSAI FERROVIAIRE (AEF)<br>
</span><i><span style="font-size:8.0pt;font-family:"Arial","sans-serif";color:#6E7678;mso-fareast-language:FR">21, Avenue Salvador Allende - 94407 VITRY SUR SEINE Cedex - CRT PRG
<br>
TÉL. : +33 (0)1 47 18 84 81 (41 94 81) - MOBILE : +33 (0)6 13 53 54 11<b> <br>
</b></span></i><span style="font-size:8.0pt;font-family:"Arial","sans-serif";color:#6E7678;mso-fareast-language:FR"><a href="mailto:philippe.vuillaume@sncf.fr" title="mailto:philippe.vuillaume@sncf.fr
blocked::mailto:philippe.vuillaume@sncf.fr"><b><i><span style="color:blue">philippe.vuillaume@sncf.fr</span></i></b></a><b><i>
</i></b></span><span style="font-size:12.0pt;font-family:"Times New Roman","serif";color:black;mso-fareast-language:FR"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:8.0pt;font-family:"Arial","sans-serif";color:#6E7678;mso-fareast-language:FR"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:8.0pt;font-family:"Arial","sans-serif";color:#6E7678;mso-fareast-language:FR"><img border="0" width="98" height="20" id="Image_x0020_1" src="cid:image002.jpg@01D4E4BB.8D7DB4B0" alt="sncf"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:8.0pt;font-family:"Arial","sans-serif";color:white;text-transform:uppercase;background:#0088CE;mso-fareast-language:FR">POUR NOUS CONTACTER :</span><b><span style="font-size:8.0pt;font-family:"Arial","sans-serif";color:#0088CE;text-transform:uppercase;background:#0088CE;mso-fareast-language:FR">:</span></b><b><span style="font-size:8.0pt;font-family:"Arial","sans-serif";color:white;text-transform:uppercase;background:#0088CE;mso-fareast-language:FR"><o:p></o:p></span></b></p>
<p class="MsoNormal"><span style="font-size:8.0pt;font-family:"Arial","sans-serif";color:#747678;mso-fareast-language:FR">Vous êtes un client SNCF, exprimez votre besoin en cliquant</span><span style="font-size:8.0pt;font-family:"Arial","sans-serif";color:#6E7678;mso-fareast-language:FR"> :</span><span style="font-size:8.0pt;font-family:"Arial","sans-serif";color:#747678;mso-fareast-language:FR">
</span><span style="color:#1F497D;mso-fareast-language:FR"><a href="https://forms.office.com/Pages/ResponsePage.aspx?id=OIJ8SplXFkufxprY_OWn2bAgJiKWE1VBnM97Uoutad9URURQRDlGVVI1WDEzT0pGNzBBSDU5SDJMWi4u"><span style="color:blue">AEF à votre service</span></a></span><span style="font-size:8.0pt;font-family:"Arial","sans-serif";color:#6E7678;mso-fareast-language:FR"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:8.0pt;font-family:"Arial","sans-serif";color:#747678;mso-fareast-language:FR">Vous êtes une société tierce, envoyez votre besoin à
</span><span style="font-size:8.0pt;font-family:"Arial","sans-serif";color:blue;mso-fareast-language:FR"><a href="mailto:contact-site@eurailtest.com"><span style="color:blue">contact-site@eurailtest.com</span></a></span><span style="font-size:10.0pt;font-family:"Arial","sans-serif";mso-fareast-language:FR"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:FR"><o:p> </o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<p>-------<br>
Ce message et toutes les pièces jointes sont établis à l'intention exclusive de ses destinataires et sont confidentiels. L'intégrité de ce message n'étant pas assurée sur Internet, la SNCF ne peut être tenue responsable des altérations qui pourraient se produire sur son contenu. Toute publication, utilisation, reproduction, ou diffusion, même partielle, non autorisée préalablement par la SNCF, est strictement interdite. Si vous n'êtes pas le destinataire de ce message, merci d'en avertir immédiatement l'expéditeur et de le détruire.<br>
-------<br>
This message and any attachments are intended solely for the addressees and are confidential. SNCF may not be held responsible for their contents whose accuracy and completeness cannot be guaranteed over the Internet. Unauthorized use, disclosure, distribution, copying, or any part thereof is strictly prohibited. If you are not the intended recipient of this message, please notify the sender immediately and delete it. </p></body>
</html>