<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<br>
<div class="moz-cite-prefix">On 25.07.2014 17:38, Steve Ratcliffe
wrote:<br>
</div>
<blockquote cite="mid:53D279F2.60903@parabola.me.uk" type="cite">Hi
<br>
<br>
<blockquote type="cite">1. There seems to be a problem with
Chinese Tonemarks...
<br>
e.g. on
<br>
<a class="moz-txt-link-freetext" href="http://www.openstreetmap.org/node/244080668">http://www.openstreetmap.org/node/244080668</a>
<br>
<br>
name:zh_pinyin ~ '.*Shì' { set
<br>
name:zh_pinyin='${name:zh_pinyin|subst:"Shì=>"}'; echo "rule
working" }
<br>
</blockquote>
<br>
This seems to work for me.
<br>
</blockquote>
Hmm, have you tried it out on China from Geofabrik? I copied the
"Shì" directly from OSM in order to be sure to get it right (not
sure if there is a difference between Chinese 4th tone and French
Accent on my keyboard even though the look identical).<br>
<br>
name:zh_pinyin ~ '.* Shì' { set
name:zh_pinyin='${name:zh_pinyin|subst:" Shì=>"}'; echo "rule XX
working" } <br>
name:zh_pinyin ~ '.* Shì' { set
name:zh_pinyin='${name:zh_pinyin|subst:"Shì=>"}'; echo "rule
working" } <br>
I cannot see any echo - even tough there is plenti of Shì in China
in zh_pinyin..<br>
<br>
The rule <br>
name:zh_pinyin ~ '.* Shì' {echo "found Shì"} is consequently also
never outputting an echo against Geofabrik China extract...<br>
name:zh_pinyin ~ '.*Shì' {echo "found .Shì"} neither...<br>
<br>
I also thought I could try to just run the rule agains all
name:zh_pinyin - but of course also to no avail..<br>
name:zh_pinyin=* { set name:zh_pinyin='${name:zh_pinyin|subst:"
Shì=>"}'; echo "rule XX working" } <br>
name:zh_pinyin=* { set
name:zh_pinyin='${name:zh_pinyin|subst:"Shì=>"}'; echo "rule
working" } <br>
is of course giving loads of echo - but I still end up with Shì in
all my name:zh_pinyin.. Nothing is substituted...<br>
<br>
So clearly I have a problem with ì...<br>
Other rules using the exactly same notation with Shi for Japan work
fine without probs...<br>
<br>
<br>
Could there be a bug on Windows only, if the rule works for you
(assuming under Linux)?<br>
Is there a possible different notation for ì that could be used?
Unicodelookup.com gives:<br>
<table>
<tbody>
<tr>
<td>0354</td>
<td>236</td>
<td>0xEC</td>
<td>&igrave;</td>
</tr>
</tbody>
</table>
<br>
<br>
But then I don't know if Chinese 4th tone is really this caracter,
or maybe another?<br>
Is there a possibility to use unicode character in mkgmap style
file?<br>
<br>
I also see: <br>
<font face="Verdana, Arial, Helvetica, sans-serif">hex: 00EC<br>
but that should be similar I would guess...<br>
</font>
<blockquote cite="mid:53D279F2.60903@parabola.me.uk" type="cite">
<br>
<blockquote type="cite">name:zh_pinyin ~ '.*Shi' { set
<br>
name:zh_pinyin='${name:zh_pinyin|subst:"Shi=>"}'; echo "rule
2 working" }
<br>
work.
<br>
</blockquote>
This one does not match the given node.
<br>
</blockquote>
I know - it was in there to make sure that maybe there is no
mashing together of i and ì. <br>
<blockquote cite="mid:53D279F2.60903@parabola.me.uk" type="cite">
<br>
<blockquote type="cite">2. How can I remove parentheses from the
name?
<br>
name=* { set name='${name|subst:"(=>"'}
<br>
name=* { set name='${name|subst:")=>"'}
<br>
</blockquote>
<br>
Perhaps it was just a typo in your mail, but these should be:
<br>
<br>
name=* { set name='${name|subst:"(=>"}' }
<br>
name=* { set name='${name|subst:")=>"}' }
<br>
<br>
<blockquote type="cite">Is not working. Or better it gets called
but I loose all characters in
<br>
Japanese or Chinese...
<br>
</blockquote>
<br>
With these corrections it does seem to remove the brackets without
<br>
losing anything else.
<br>
</blockquote>
Oh yeah - that was a typo in my style. Rule is working correctly
now...<br>
<br>
<br>
<blockquote cite="mid:53D279F2.60903@parabola.me.uk" type="cite">
<br>
..Steve
<br>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
keep on biking and discovering new trails
Felix
openmtbmap.org & <a class="moz-txt-link-abbreviated" href="http://www.velomap.org">www.velomap.org</a></pre>
</body>
</html>