<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Efficy Overflow Q&amp;A - Recent questions tagged accented-letters</title>
<link>https://overflow.efficy.io/?qa=tag/accented-letters</link>
<description>Powered by Question2Answer</description>
<item>
<title>How to convert windows 1252 to UTF-8 ?</title>
<link>https://overflow.efficy.io/?qa=6592/how-to-convert-windows-1252-to-utf-8</link>
<description>&lt;p&gt;Hello,&lt;/p&gt;

&lt;p&gt;I'm running into an issue regarding char encoding.&lt;/p&gt;

&lt;p&gt;I'm making a Efficy.openUrlSecure(...) POST call to send JSON data to another system.&lt;br&gt;
Data is from a Contact (name, firstname, email, ....) and my call is made in a afterCommit workflow. So all data is taken from database.&lt;/p&gt;

&lt;p&gt;If I use a special char like &quot;é&quot; in sent data, the API send me an error :&lt;br&gt;
&lt;em&gt;Error 400. Response : Invalid UTF-8 middle byte 0x22 at...&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Code used :&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;var toSend = JSON.stringify(data);
var headers = [&quot;Content-Type: application/json;charset=utf-8&quot;, &quot;Content-Length: &quot; + toSend.length, &quot;Host: xxx&quot;];

var response = Efficy.openUrlSecure(url, toSend, headers.join(&quot;\n&quot;), &quot;POST&quot;);
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;After investigation, this error is caused by an invalid/illegal encoding (windows 1252 instead of UTF-8 which is standard for JSON).&lt;/p&gt;

&lt;p&gt;When I check in detail what is sent, the request payload is in windows-1252.&lt;/p&gt;

&lt;p&gt;Which brings it to my question : How can I convert my data in windows-1252 to UTF-8 without losing accentuated char ?&lt;/p&gt;
</description>
<category>WorkFlow / Serverscript</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=6592/how-to-convert-windows-1252-to-utf-8</guid>
<pubDate>Fri, 10 Jun 2022 09:44:52 +0000</pubDate>
</item>
<item>
<title>Custom agenda appointment modes colors with accents</title>
<link>https://overflow.efficy.io/?qa=4243/custom-agenda-appointment-modes-colors-with-accents</link>
<description>&lt;p&gt;Hello,&lt;/p&gt;

&lt;p&gt;A customer has been recently moved to the cloud. Efficy version is 11.0&lt;/p&gt;

&lt;p&gt;There were custom colors for the different modes and one of them was &quot;Privé&quot;. After the move, this didn't work anymore as the mode wasn't recognized.&lt;/p&gt;

&lt;p&gt;I found that the problem was the accented character. The file &lt;code&gt;MacroAgendaCustom.txt&lt;/code&gt; was encoded in &lt;code&gt;ANSI&lt;/code&gt; and when i switched to &lt;code&gt;UTF-8&lt;/code&gt; it worked again.&lt;br&gt;
So when moving to the cloud the encoding somehow changed?&lt;/p&gt;

&lt;p&gt;So this is more me reporting this issue than asking a question.&lt;br&gt;
But is this is a known issue? Has this been fixed so that this works no matter the encoding and is this checked when moving to the cloud?&lt;/p&gt;

&lt;p&gt;Thank you.&lt;/p&gt;
</description>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=4243/custom-agenda-appointment-modes-colors-with-accents</guid>
<pubDate>Wed, 15 May 2019 08:15:44 +0000</pubDate>
</item>
<item>
<title>OpenUrlSecure response isn't in UTF-8</title>
<link>https://overflow.efficy.io/?qa=3888/openurlsecure-response-isnt-in-utf-8</link>
<description>&lt;p&gt;Hi,&lt;/p&gt;

&lt;p&gt;I'm working on a Rest API and run into a problem that my response from OpenUrlSecure isn't in UTF-8. So this means that accented letters aren't correctly displayed.&lt;br&gt;
The request that I do is:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;var wr = new WebRequest({
        url: this.options.datacollectiefUrl, 
        headers: &quot;Content-Type: application/json; charset=utf-8&quot;,
        complete: function(resp, req) {
            return resp;
        }
    });

    var send = function(method, path, data) {           
        return wr.send(data, path, method);
    }

    return send(&quot;GET&quot;, this.options.apiCommandsUrl.contSearch, format(&quot;?user=$0&amp;amp;password=$1&amp;amp;applicationName=$2&amp;amp;id=$3&quot;, this.options.licensename, this.options.licensepassword, this.options.appName, companyId));
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Is there something that I can change on this request to make it return the response in UTF-8?&lt;/p&gt;

&lt;p&gt;Best regards,&lt;br&gt;
Jeroen&lt;/p&gt;
</description>
<category>WorkFlow / Serverscript</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=3888/openurlsecure-response-isnt-in-utf-8</guid>
<pubDate>Fri, 25 Jan 2019 16:15:08 +0000</pubDate>
</item>
</channel>
</rss>