<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Encode &#x2F; Decode &#x2F; Unicode ?]]></title><description><![CDATA[<p dir="auto"><em><strong>THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED</strong></em></p>
<p dir="auto"><em>On 15/02/2011 at 07:05, <strong>xxxxxxxx</strong> wrote:</em></p>
<p dir="auto">Hi folks,</p>
<p dir="auto">I still try to finish my texturereplacementscript which works pretty nice on the R12 with a little exception.</p>
<p dir="auto">Here is the tricky part of what I have so far:</p>
<blockquote>
<p dir="auto">if shd.GetType() == c4d.Xbitmap:<br />
      print "old-----------&gt;", shd[c4d.BITMAPSHADER_FILENAME]<br />
      file = os.path.basename(shd[c4d.BITMAPSHADER_FILENAME])<br />
      print "File---------&gt;", File<br />
      shd[c4d.BITMAPSHADER_FILENAME] = path + os.sep + file<br />
  print "New Path----&gt;", shd[c4d.BITMAPSHADER_FILENAME]</p>
</blockquote>
<p dir="auto">As said it works nicely, if the filenames are "normal" means that there are no mutated vowels (umlaut) or other non-ascii-conform characters in the filename.</p>
<p dir="auto">If so( filename: 9Tür.jpg e.g.)  the console shows me something like that:</p>
<blockquote>
<p dir="auto">old-----------&gt; C:\sg\Test\9Tür.jpg<br />
File ---&gt; u00FCr.jpg<br />
New path ---&gt; T:\python	est\9Tür.jpg</p>
</blockquote>
<p dir="auto">If I could only trust the print statement ...</p>
<p dir="auto">In C4D the replaced path is : T:\python	est\u00FCr.jpg</p>
<p dir="auto">The problem is that the last "" (which determines the end of a directory path) is not the one it should be.<br />
The last "" is in front of the non-ascii character : "\u00FCr.jpg"<br />
That is the reason why I can't use split path for that.</p>
<p dir="auto">I also tried newpath.encode("UTF-8")</p>
<p dir="auto">but without any noticable effect.</p>
<p dir="auto">Can anyone give me a hint how to deal with that please?</p>
<p dir="auto"><a href="http://dict.leo.org/ende?lp=ende&amp;p=Ci4HO3kMAA&amp;search=vowel&amp;trestr=0x8001" target="_blank" rel="noopener noreferrer nofollow ugc" class="plugin-markdown-hidden-link small link-danger"></a></p>
]]></description><link>http://developers.maxon.net/forum/topic/5500/5519_encode--decode--unicode-</link><generator>RSS for Node</generator><lastBuildDate>Mon, 10 Aug 2026 17:01:04 GMT</lastBuildDate><atom:link href="http://developers.maxon.net/forum/topic/5500.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 09 May 2018 17:51:19 GMT</pubDate><ttl>60</ttl></channel></rss>