German collation of ß in upper and lower case in Cache 2017
Recently upper case ß was defined as an official character for German
how can this be adjusted in Caché 2017 ?
Comments
Thanks Robert ![]()
I just got this information:
Developer group worked at it and version 2018.1 1 will contain the new pattern.
![]()
![]()
Just one file should be changed for it, and it is less than an hour of work.
You can fix this error directly now, if you don't want to wait for the release of version 2018.1.1.
To do this, follow these steps:
- make export the locale "deuw"
%SYS>s Locales("deuw")="" d $system.OBJ.DisplayError(##class(Config.NLS.Locales).ExportList("loc_deuw.xml",.t,.Locales)) zw Locales,t - fix the file loc_deuw.xml (by default located in the folder %CACHEHOME%\Mgr)
Name of subtable (Where to insert) New lines (That to insert) Add the following lines to the appropriate subtables: COL-German3-Unicode <FromToItem FromToKey="55,55,1">83,83;</FromToItem> <FromToItem FromToKey="55,55,2">7838;</FromToItem> <FromToItem FromToKey="55,55,3">83,7838;</FromToItem> COL-Unicode-German3 <FromToItem FromToKey="7838">55,55;2</FromToItem> <FromToItem FromToKey="83,83">55,55;1</FromToItem> <FromToItem FromToKey="83,7838">55,55;3</FromToItem> LowerCase-Unicode-Unicode <FromToItem FromToKey="7838">223</FromToItem> UpperCase-Unicode-Unicode <FromToItem FromToKey="223">7838</FromToItem> - import fixed loc_deuw.xml:
%SYS>d $system.OBJ.DisplayError(##class(Config.NLS.Locales).ImportAll("loc_deuw.xml",.t,1+2+4)) zw t %SYS>d $system.OBJ.DisplayError(##class(Config.NLS.Locales).Compile("deuw")) %SYS>d Locale^NLSLOAD("deuw")Just in case, restart Caché.
#include %systemInclude
#include %occErrors
#include %syNLS
test() public {
#dim ex As %Exception.AbstractException
</FONT><FONT COLOR="#0000ff">try </FONT><FONT COLOR="#800080">{
</FONT><FONT COLOR="#0000ff">$$$AddAllRoleTemporaryInTry
n $namespace
s $namespace</FONT><FONT COLOR="#000000">=</FONT><FONT COLOR="#008000">"%SYS"
</FONT><FONT COLOR="#0000ff">s </FONT><FONT COLOR="#800000">oldLocale</FONT><FONT COLOR="#000000">=</FONT><FONT COLOR="#0000ff">$$$LOCALENAME
w </FONT><FONT COLOR="#008000">"Old locale = "</FONT><FONT COLOR="#000000">,</FONT><FONT COLOR="#800000">oldLocale</FONT><FONT COLOR="#000000">,!
</FONT><FONT COLOR="#0000ff">d </FONT><FONT COLOR="#000080">##class</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#008080">Config.NLS.Locales</FONT><FONT COLOR="#000000">).</FONT><FONT COLOR="#0000ff">Install</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#008000">"deuw"</FONT><FONT COLOR="#000000">)
</FONT><FONT COLOR="#0000ff">w </FONT><FONT COLOR="#008000">"Current locale = "</FONT><FONT COLOR="#000000">,</FONT><FONT COLOR="#0000ff">$$$LOCALENAME</FONT><FONT COLOR="#000000">,!!
</FONT><FONT COLOR="#0000ff">k </FONT><FONT COLOR="#000000">^||low,^||up
</FONT><FONT COLOR="#0000ff">f </FONT><FONT COLOR="#800000">w</FONT><FONT COLOR="#000000">=</FONT><FONT COLOR="#008000">"wei"</FONT><FONT COLOR="#000000"></FONT><FONT COLOR="#0000ff">$c</FONT><FONT COLOR="#000000">(223)</FONT><FONT COLOR="#008000">"er"</FONT><FONT COLOR="#000000">,</FONT><FONT COLOR="#008000">"weiter"</FONT><FONT COLOR="#000000">,</FONT><FONT COLOR="#008000">"weiser" </FONT><FONT COLOR="#800080">{
</FONT><FONT COLOR="#0000ff">s </FONT><FONT COLOR="#000000">^||low(</FONT><FONT COLOR="#0000ff">$zcvt</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#800000">w</FONT><FONT COLOR="#000000">,</FONT><FONT COLOR="#008000">"L"</FONT><FONT COLOR="#000000">))=1
</FONT><FONT COLOR="#0000ff">s </FONT><FONT COLOR="#000000">^||up(</FONT><FONT COLOR="#0000ff">$zcvt</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#800000">w</FONT><FONT COLOR="#000000">,</FONT><FONT COLOR="#008000">"U"</FONT><FONT COLOR="#000000">))=1
</FONT><FONT COLOR="#800080">}
</FONT><FONT COLOR="#0000ff">zw </FONT><FONT COLOR="#000000">^||low,^||up
</FONT><FONT COLOR="#0000ff">s </FONT><FONT COLOR="#800000">low</FONT><FONT COLOR="#000000">=</FONT><FONT COLOR="#0000ff">$c</FONT><FONT COLOR="#000000">(223)
</FONT><FONT COLOR="#0000ff">s </FONT><FONT COLOR="#800000">up</FONT><FONT COLOR="#000000">=</FONT><FONT COLOR="#0000ff">$zcvt</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#800000">low</FONT><FONT COLOR="#000000">,</FONT><FONT COLOR="#008000">"U"</FONT><FONT COLOR="#000000">)
</FONT><FONT COLOR="#0000ff">zw </FONT><FONT COLOR="#800000">low</FONT><FONT COLOR="#000000">,</FONT><FONT COLOR="#800000">up
</FONT><FONT COLOR="#0000ff">zzdump </FONT><FONT COLOR="#800000">low</FONT><FONT COLOR="#000000">,</FONT><FONT COLOR="#800000">up
</FONT><FONT COLOR="#800080">}</FONT><FONT COLOR="#0000ff">catch</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#800000">ex</FONT><FONT COLOR="#000000">) </FONT><FONT COLOR="#800080">{
</FONT><FONT COLOR="#0000ff">w </FONT><FONT COLOR="#008000">"Error "</FONT><FONT COLOR="#000000">, </FONT><FONT COLOR="#800000">ex</FONT><FONT COLOR="#000000">.</FONT><FONT COLOR="#0000ff">DisplayString</FONT><FONT COLOR="#000000">(),!
</FONT><FONT COLOR="#800080">}
</FONT><FONT COLOR="#0000ff">d </FONT><FONT COLOR="#000080">##class</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#008080">Config.NLS.Locales</FONT><FONT COLOR="#000000">).</FONT><FONT COLOR="#0000ff">Install</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#800000">oldLocale</FONT><FONT COLOR="#000000">)
</FONT><FONT COLOR="#800080">}</FONT>
My result:
USER>d ^test Old locale = rusw Current locale = deuw^||low("weiser")=1 ^||low("weißer")=1 ^||low("weiter")=1 ^||up("WEISER")=1 ^||up("WEIẞER")=1 ^||up("WEITER")=1 low="ß" up="ẞ"
0000: DF ß 0000: 1E9E ẞ
WOW !![]()
![]()
![]()
Great stuff. I almost can't believe it.