<?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 Lisp problems with Turkish characters (Ç, Ğ, I, İ, Ö, Ş, Ü) in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-problems-with-turkish-characters-c-g-i-i-o-s-u/m-p/7934534#M106032</link>
    <description>Hello&lt;BR /&gt;I have several lisps that load the name of the file and layouts to put it in different attribute texts&lt;BR /&gt;(this one, for example)&lt;BR /&gt;&lt;A href="https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-batch-rename-layouts-according-to-drawing-file-name/td-p/7926349" target="_blank"&gt;https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-batch-rename-layouts-according-to-drawing-file-name/td-p/7926349&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;My problem is that these lisps fail when the name of the file or the layouts contain a Turkish letter such as the ones in the title of the post, as it doesn't store it correctly as a string variable.&lt;BR /&gt;&lt;BR /&gt;Is it possible to overcome this issue? My Autocad version is not Turkish and I'm blocked many times due to this.&lt;BR /&gt;Thank you so much.&lt;BR /&gt;</description>
    <pubDate>Mon, 16 Apr 2018 08:03:55 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2018-04-16T08:03:55Z</dc:date>
    <item>
      <title>Lisp problems with Turkish characters (Ç, Ğ, I, İ, Ö, Ş, Ü)</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-problems-with-turkish-characters-c-g-i-i-o-s-u/m-p/7934534#M106032</link>
      <description>Hello&lt;BR /&gt;I have several lisps that load the name of the file and layouts to put it in different attribute texts&lt;BR /&gt;(this one, for example)&lt;BR /&gt;&lt;A href="https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-batch-rename-layouts-according-to-drawing-file-name/td-p/7926349" target="_blank"&gt;https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-batch-rename-layouts-according-to-drawing-file-name/td-p/7926349&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;My problem is that these lisps fail when the name of the file or the layouts contain a Turkish letter such as the ones in the title of the post, as it doesn't store it correctly as a string variable.&lt;BR /&gt;&lt;BR /&gt;Is it possible to overcome this issue? My Autocad version is not Turkish and I'm blocked many times due to this.&lt;BR /&gt;Thank you so much.&lt;BR /&gt;</description>
      <pubDate>Mon, 16 Apr 2018 08:03:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-problems-with-turkish-characters-c-g-i-i-o-s-u/m-p/7934534#M106032</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-04-16T08:03:55Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp problems with Turkish characters (Ç, Ğ, I, İ, Ö, Ş, Ü)</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-problems-with-turkish-characters-c-g-i-i-o-s-u/m-p/7935186#M106033</link>
      <description>&lt;P&gt;First off, there's nothing Turkish about these characters, just because the Turkish use 'm (like the french, Germans, Spanish, etc,etc.etc.)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Second, these are not part of the regular character table, but the extended part. Problem there is the extended part is font specific. So, you won't see 'm, with some fonts (just "?" or something else (ö shows as % for example) you did not want)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Your string is actually a list of references to such a font-character-table. Switching the font, might just switch your extended characters &amp;amp; therefor your text.&amp;nbsp;So, using the right font is key.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That's the only thing i can think of right now, as your example code works perfect for me. The string IS stored correctly. If i use my lastname (which contains such (german) characters) it works like a charm. The sheet name is named correctly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example-&lt;/P&gt;&lt;P&gt;if the file is named: Grüß&lt;/P&gt;&lt;P&gt;(setq name (vl-filename-base (getvar "dwgname")))&lt;/P&gt;&lt;P&gt;returns...&lt;/P&gt;&lt;P&gt;"Grüß"&lt;/P&gt;&lt;P&gt;Using it to rename sheets works just as well. (right here, on my system, which is English / US-International)&lt;/P&gt;</description>
      <pubDate>Mon, 16 Apr 2018 13:17:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-problems-with-turkish-characters-c-g-i-i-o-s-u/m-p/7935186#M106033</guid>
      <dc:creator>roland.r71</dc:creator>
      <dc:date>2018-04-16T13:17:21Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp problems with Turkish characters (Ç, Ğ, I, İ, Ö, Ş, Ü)</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-problems-with-turkish-characters-c-g-i-i-o-s-u/m-p/7935644#M106034</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous wrote:&lt;BR /&gt;Hello&lt;BR /&gt;I have several lisps that load the name of the file and layouts to put it in different attribute texts&lt;BR /&gt;(this one, for example)&lt;BR /&gt;&lt;A href="https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-batch-rename-layouts-according-to-drawing-file-name/td-p/7926349" target="_blank"&gt;https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-batch-rename-layouts-according-to-drawing-file-name/td-p/7926349&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;My problem is that these lisps fail when the name of the file or the layouts contain a Turkish letter such as the ones in the title of the post, as it doesn't store it correctly as a string variable.&lt;BR /&gt;&lt;BR /&gt;Is it possible to overcome this issue? My Autocad version is not Turkish and I'm blocked many times due to this.&lt;BR /&gt;Thank you so much.&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Hi movieboxdv005,&lt;/P&gt;
&lt;P&gt;I did find some problems using&lt;/P&gt;
&lt;PRE&gt;(vl-filename-base (getvar "dwgname"))&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;in a dwg named "ÇĞIİÖŞÜ.dwg"... the layout was renamed to "U+015EÜ"....&lt;/P&gt;
&lt;P&gt;Try to change&lt;/P&gt;
&lt;PRE&gt;(setq name (vl-filename-base (getvar "dwgname")))&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;to&lt;/P&gt;
&lt;PRE&gt;(setq name (substr (getvar 'DWGNAME) 1 (- (strlen (getvar 'DWGNAME)) 4))&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps, &lt;BR /&gt;Henrique&lt;/P&gt;</description>
      <pubDate>Mon, 16 Apr 2018 15:57:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-problems-with-turkish-characters-c-g-i-i-o-s-u/m-p/7935644#M106034</guid>
      <dc:creator>hmsilva</dc:creator>
      <dc:date>2018-04-16T15:57:17Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp problems with Turkish characters (Ç, Ğ, I, İ, Ö, Ş, Ü)</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-problems-with-turkish-characters-c-g-i-i-o-s-u/m-p/10960002#M106035</link>
      <description>&lt;P&gt;I AM USING THE FOLLOWING CODE TO SELECT A LAYER:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(if (not (tblsearch "layer" "E-FORÇA"))(command "layer" "new" "E-FORÇA" "c" "3" "E-;FORÇA" ""))&lt;BR /&gt;(command "-layer" "s" "E-FORÇA" "")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;BUT RETURNS AN ERROR DUE TO THE CHARACTER Ç.&lt;BR /&gt;HOW DO I MAKE LISP UNDERSTAND WHAT IS "FORÇA"?&lt;/P&gt;</description>
      <pubDate>Fri, 18 Feb 2022 22:59:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-problems-with-turkish-characters-c-g-i-i-o-s-u/m-p/10960002#M106035</guid>
      <dc:creator>malmattos</dc:creator>
      <dc:date>2022-02-18T22:59:51Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp problems with Turkish characters (Ç, Ğ, I, İ, Ö, Ş, Ü)</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-problems-with-turkish-characters-c-g-i-i-o-s-u/m-p/10960065#M106036</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/2042588"&gt;@malmattos&lt;/a&gt;&amp;nbsp;, if you are going to SET the layer as current , there is no need to ask if exist , just Make the Layer and it becomes current .&amp;nbsp;&lt;/P&gt;&lt;P&gt;acad do not worry if its exist or not , just use layer M&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;(command "layer" "_m" "E-FORÇA" "c" "3"  ""))&lt;/LI-CODE&gt;&lt;P&gt;, I did no set the linetype , because I have not it.&lt;/P&gt;&lt;P&gt;Yes it need to check if linetype&amp;nbsp; &lt;SPAN&gt;"E-;FORÇA"&lt;/SPAN&gt;&amp;nbsp; exist, because&amp;nbsp; it is a condition to assign a linetype to a layer&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="devitg_0-1645229842354.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1027150i80EC115DBB01159F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="devitg_0-1645229842354.png" alt="devitg_0-1645229842354.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 19 Feb 2022 00:21:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-problems-with-turkish-characters-c-g-i-i-o-s-u/m-p/10960065#M106036</guid>
      <dc:creator>devitg</dc:creator>
      <dc:date>2022-02-19T00:21:51Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp problems with Turkish characters (Ç, Ğ, I, İ, Ö, Ş, Ü)</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-problems-with-turkish-characters-c-g-i-i-o-s-u/m-p/11165355#M106037</link>
      <description>&lt;P&gt;If anyone has the same problem, I managed to solve it by replacing the character Ç with \\U+00C7&lt;BR /&gt;example: ("força") -&amp;gt; ("for\\U+00C7a")&lt;/P&gt;</description>
      <pubDate>Thu, 12 May 2022 18:19:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-problems-with-turkish-characters-c-g-i-i-o-s-u/m-p/11165355#M106037</guid>
      <dc:creator>malmattos</dc:creator>
      <dc:date>2022-05-12T18:19:41Z</dc:date>
    </item>
  </channel>
</rss>

