<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic No unicode characters in postprocessor in HSM Post Processor Forum</title>
    <link>https://forums.autodesk.com/t5/hsm-post-processor-forum/no-unicode-characters-in-postprocessor/m-p/7418147#M17548</link>
    <description>&lt;P&gt;Hi.&lt;/P&gt;&lt;P&gt;When I&amp;nbsp;name the operation e.g. "kupa łąćź ćłżc" or write this text as a comment to 'Manual NC' I get something like this "(kupa1 ӹ柠泿c )" or this "kupa1 B&amp;#5;&amp;#7;z &amp;#7;B|c)" in my g-code file. Executing&amp;nbsp;setCodePage("UTF-8"); or&amp;nbsp;setCodePage("utf-8"); at the beginning of the postprocessor is not helping &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Writing to file&amp;nbsp;writeln(&lt;SPAN&gt;"kupa łąćź ćłżc") works fine.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 28 Sep 2017 19:18:48 GMT</pubDate>
    <dc:creator>pawelzwronek</dc:creator>
    <dc:date>2017-09-28T19:18:48Z</dc:date>
    <item>
      <title>No unicode characters in postprocessor</title>
      <link>https://forums.autodesk.com/t5/hsm-post-processor-forum/no-unicode-characters-in-postprocessor/m-p/7418147#M17548</link>
      <description>&lt;P&gt;Hi.&lt;/P&gt;&lt;P&gt;When I&amp;nbsp;name the operation e.g. "kupa łąćź ćłżc" or write this text as a comment to 'Manual NC' I get something like this "(kupa1 ӹ柠泿c )" or this "kupa1 B&amp;#5;&amp;#7;z &amp;#7;B|c)" in my g-code file. Executing&amp;nbsp;setCodePage("UTF-8"); or&amp;nbsp;setCodePage("utf-8"); at the beginning of the postprocessor is not helping &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Writing to file&amp;nbsp;writeln(&lt;SPAN&gt;"kupa łąćź ćłżc") works fine.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Sep 2017 19:18:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/hsm-post-processor-forum/no-unicode-characters-in-postprocessor/m-p/7418147#M17548</guid>
      <dc:creator>pawelzwronek</dc:creator>
      <dc:date>2017-09-28T19:18:48Z</dc:date>
    </item>
    <item>
      <title>Re: No unicode characters in postprocessor</title>
      <link>https://forums.autodesk.com/t5/hsm-post-processor-forum/no-unicode-characters-in-postprocessor/m-p/7420774#M17549</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3912910"&gt;@pawelzwronek&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please note that CNCs will commonly not support UTF-8 in the NC programs.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I tested that UTF-8 output works fine. So you have to make sure that you dont set the codepage in multiple places.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you edit the dump.cps and add this line then it works for me:&lt;/P&gt;
&lt;PRE&gt;extension = "dmp";
// using user code page
setCodePage("utf-8"); // ADDED THIS LINE FOR UTF-8

capabilities = CAPABILITY_INTERMEDIATE;

allowMachineChangeOnSection = true;&lt;/PRE&gt;
&lt;P&gt;In the output you will then see something like this - see the last onComment():&lt;/P&gt;
&lt;PRE&gt;524: onLinear(-13.815099716186523, 0.4000000059604645, 0, 1000)
525: onMovement(MOVEMENT_RAPID /*rapid*/)
525: onRapid(-13.815099716186523, 0.4000000059604645, 17)
526: onSectionEnd()
  STATE position=[-13.8151, 0.4, 17]
  STATE spindleSpeed=5000
  STATE radiusCompensation=RADIUS_COMPENSATION_OFF // off
528: onComment('kupa łąćź ćłżc ÆØÅæøå')
528: onClose()
&lt;/PRE&gt;</description>
      <pubDate>Fri, 29 Sep 2017 16:14:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/hsm-post-processor-forum/no-unicode-characters-in-postprocessor/m-p/7420774#M17549</guid>
      <dc:creator>fonsecr</dc:creator>
      <dc:date>2017-09-29T16:14:40Z</dc:date>
    </item>
    <item>
      <title>Re: No unicode characters in postprocessor</title>
      <link>https://forums.autodesk.com/t5/hsm-post-processor-forum/no-unicode-characters-in-postprocessor/m-p/7420778#M17550</link>
      <description>&lt;P&gt;Make sure you use an editor that supports UTF-8 also and make sure UTF-8 mode is active. Otherwise you will see wrong characters.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also , please note that depending on the post you use it might filter non ASCII characters. These posts will commonly have a variable called&amp;nbsp;permittedCommentChars - that hold the chars that comments will output.&lt;/P&gt;</description>
      <pubDate>Fri, 29 Sep 2017 16:16:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/hsm-post-processor-forum/no-unicode-characters-in-postprocessor/m-p/7420778#M17550</guid>
      <dc:creator>fonsecr</dc:creator>
      <dc:date>2017-09-29T16:16:45Z</dc:date>
    </item>
    <item>
      <title>Re: No unicode characters in postprocessor</title>
      <link>https://forums.autodesk.com/t5/hsm-post-processor-forum/no-unicode-characters-in-postprocessor/m-p/7421301#M17551</link>
      <description>&lt;P&gt;My modified dump.cps:&lt;/P&gt;&lt;PRE&gt;...
extension = "dmp";
// using user code page
setCodePage("utf-8");
...
function onComment() {
  dump("onComment kupa łąćź ćłżc", arguments);
  writeln("kupa2 łąćź ćłżc");
}
...&lt;/PRE&gt;&lt;P&gt;After postprocess of&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="kupa.png" style="width: 335px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/407170i1278A1590A997035/image-size/large?v=v2&amp;amp;px=999" role="button" title="kupa.png" alt="kupa.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I get in 1001.dmp this:&lt;/P&gt;&lt;PRE&gt;...
36: onParameter('operation-strategy', 'contour2d')
37: onParameter('operation-comment', 'kupa łąćź ćłżc')
38: onParameter('autodeskcam:operation-id', 2)
39: onParameter('leads-supported', 1)
40: onParameter('autodeskcam:path', 'Setup1\kupa łąćź ćłżc')
41: onParameter('operation:advancedMode', 0)
...
432: onComment kupa Ĺ‚Ä…Ä‡Ĺş Ä‡Ĺ‚ĹĽc('kupa B&amp;#5;&amp;#7;z &amp;#7;B|c')
kupa2 Ĺ‚Ä…Ä‡Ĺş Ä‡Ĺ‚ĹĽc
432: onClose()
...&lt;/PRE&gt;&lt;P&gt;Screen from Notepad++:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="kupa++.png" style="width: 594px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/407171i9E2D1A4F39C1A674/image-size/large?v=v2&amp;amp;px=999" role="button" title="kupa++.png" alt="kupa++.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So operation names are fine but dont know why but comments and writeln hardcoded unicode text are wrong.&lt;/P&gt;</description>
      <pubDate>Fri, 29 Sep 2017 19:24:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/hsm-post-processor-forum/no-unicode-characters-in-postprocessor/m-p/7421301#M17551</guid>
      <dc:creator>pawelzwronek</dc:creator>
      <dc:date>2017-09-29T19:24:54Z</dc:date>
    </item>
    <item>
      <title>Re: No unicode characters in postprocessor</title>
      <link>https://forums.autodesk.com/t5/hsm-post-processor-forum/no-unicode-characters-in-postprocessor/m-p/7421308#M17552</link>
      <description>&lt;P&gt;With disabled 'utf-8' in dump.cps&amp;nbsp;I get:&lt;/P&gt;&lt;PRE&gt;...
37: onParameter('operation-comment', 'kupa ӹ柠泿c')
38: onParameter('autodeskcam:operation-id', 2)
39: onParameter('leads-supported', 1)
40: onParameter('autodeskcam:path', 'Setup1\kupa ӹ柠泿c')
41: onParameter('operation:advancedMode', 0)
...
432: onComment kupa łąćź ćłżc('kupa B&amp;#5;&amp;#7;z &amp;#7;B|c')
kupa2 łąćź ćłżc
432: onClose()
...&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Sep 2017 19:28:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/hsm-post-processor-forum/no-unicode-characters-in-postprocessor/m-p/7421308#M17552</guid>
      <dc:creator>pawelzwronek</dc:creator>
      <dc:date>2017-09-29T19:28:07Z</dc:date>
    </item>
    <item>
      <title>Re: No unicode characters in postprocessor</title>
      <link>https://forums.autodesk.com/t5/hsm-post-processor-forum/no-unicode-characters-in-postprocessor/m-p/7421399#M17553</link>
      <description>&lt;P&gt;Are you on Windows or Mac? Should behave the same but good to know when I'll check this later.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I cant see which encoding you used for the cps edits. But I'll check if UTF-8 works properly also.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Sep 2017 20:02:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/hsm-post-processor-forum/no-unicode-characters-in-postprocessor/m-p/7421399#M17553</guid>
      <dc:creator>fonsecr</dc:creator>
      <dc:date>2017-09-29T20:02:49Z</dc:date>
    </item>
    <item>
      <title>Re: No unicode characters in postprocessor</title>
      <link>https://forums.autodesk.com/t5/hsm-post-processor-forum/no-unicode-characters-in-postprocessor/m-p/7421435#M17554</link>
      <description>&lt;P&gt;I'm on Windows10/64bit and dump.cps also in utf-8.&lt;/P&gt;</description>
      <pubDate>Fri, 29 Sep 2017 20:13:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/hsm-post-processor-forum/no-unicode-characters-in-postprocessor/m-p/7421435#M17554</guid>
      <dc:creator>pawelzwronek</dc:creator>
      <dc:date>2017-09-29T20:13:21Z</dc:date>
    </item>
  </channel>
</rss>

