It really shouldn't be a problem - XML & XSLT supports many character sets but maybe UTF-8 (or UTF-16) is enough?.
I don't know how all the encoding stuff is handled in .NET, but first: Have you tried it? And if you have and it didn't "work" - what did you get instead?
Okay - I'm curious to what the actual error is - could you add ?umbDebugShowTrace=True to the URL - there should be some debug output - if you can find the XSLT error there should be a better description of what goes wrong.
If you open the XSLT file in an editor that can show you the encoding, what does it say?
Now for the actual XML: Find the /App_Data/Umbraco.config file and open it in a texteditor - it's an XML file and you should be able to see how the chinese nodeNames are encoded in here. Furthermore, you should be able to rename it to data.xml and open it in a browser - if you get any "character set" or "encoding" related errors let us know...
Macro with Chinese nodename
The following macro works with non-chinese nodenames.
Is it possible to get it work with a Chinese nodename?
<!-- The fun starts here -->
<ul>
<xsl:for-each select="$currentPage/ancestor-or-self::node[@level = '1']/node[@nodeName='News']/descendant::node[@nodeTypeAlias='Nyhed']">
<li>
<a title="Read news {@nodeName}" href="{umbraco.library:NiceUrl(@id)}"><xsl:value-of select="@nodeName"/></a>
<p class="date"><xsl:value-of select="umbraco.library:LongDate(data [@alias = 'dato'])"/></p> </li>
</xsl:for-each>
</ul>
Hi Jes - welcome to the forum!
It really shouldn't be a problem - XML & XSLT supports many character sets but maybe UTF-8 (or UTF-16) is enough?.
I don't know how all the encoding stuff is handled in .NET, but first: Have you tried it? And if you have and it didn't "work" - what did you get instead?
/Chriztian
Hi Chriztian
Tried it and the macro is ignored. Maybe it is because the ANSI encoding does not preserve the chinese nodename.
Saving in unicode makes the macro unreadable 'error reading XSLT file'
So I'm a bit stuck.
Okay - I'm curious to what the actual error is - could you add ?umbDebugShowTrace=True to the URL - there should be some debug output - if you can find the XSLT error there should be a better description of what goes wrong.
If you open the XSLT file in an editor that can show you the encoding, what does it say?
Now for the actual XML: Find the /App_Data/Umbraco.config file and open it in a texteditor - it's an XML file and you should be able to see how the chinese nodeNames are encoded in here. Furthermore, you should be able to rename it to data.xml and open it in a browser - if you get any "character set" or "encoding" related errors let us know...
/Chriztian
Solved so far. Saving the xslt file in UTF-8 preserved the chinese node name and it stated working.
is working on a reply...