<?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>Question Re: Create a norwegian database in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/create-a-norwegian-database/qaa-p/13827695#M4858538</link>
    <description>&lt;P&gt;Just two questions/remarks:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;
&lt;P&gt;Do you use CHAR or NCHAR data types for those international texts? Because by default NCHAR data will use the UCA collation, which should work fine in your original database. However, if you are using CHAR data types and want to store international data, the default single byte character sets won't allow more than 256 char, obviously. If that limit is critical, you need to use UCA there, as well.&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;UTF8BIN is a multi-byte character set with binary sorting, so it by design treats each characters with and without accents or case as different. That is apparently not your goal.&lt;/P&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;If you want multi-byte characters both with CHAR and NCHAR, I guess the following should do:&lt;/P&gt;
&lt;PRE&gt;CREATE DATABASE 'norwegian.db' COLLATION 'UCA(locale=no;case=ignore;accent=ignore)' NCHAR COLLATION 'UCA(locale=no;case=ignore;accent=ignore)';
&lt;/PRE&gt;

&lt;P&gt;I can't tell whether the &lt;A href="http://dcx.sap.com/index.html#sqla170/en/html/3bcca7c76c5f1014a890f8644fd5d071.html"&gt;"collation tailoring options"&lt;/A&gt; do fit and whether Norwegian has particular sorting variants like German or Swedish (via sorttype=phonebook), so you might adjust that.&lt;/P&gt;
&lt;P&gt;Note that using the UCA collation by default uses UTF-8 as encoding.&lt;/P&gt;
&lt;P&gt;Just to add: Whether you need to distinguish between Bokmål and Nynorsk is fully out of my scope... &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 28 May 2021 03:03:42 GMT</pubDate>
    <dc:creator>VolkerBarth</dc:creator>
    <dc:date>2021-05-28T03:03:42Z</dc:date>
    <item>
      <title>Create a norwegian database</title>
      <link>https://community.sap.com/t5/technology-q-a/create-a-norwegian-database/qaq-p/13827694</link>
      <description>&lt;P&gt;We had a database created like this:
CREATE DATABASE 'norwegian.db' COLLATION '819NOR' NCHAR COLLATION 'UCA';&lt;/P&gt;
&lt;P&gt;But got problems when trying to store characters outside that collation.&lt;/P&gt;
&lt;P&gt;So we reloaded the database to:
CREATE DATABASE 'norwegian.db' COLLATION 'UTF8BIN' NCHAR COLLATION 'UTF8BIN';&lt;/P&gt;
&lt;P&gt;But now we have problem with sorting and comparison.
Well sorting we solved with:
set option sort_collation='48'
or 
set  option sort_collation='UCA(locale=nob)'
(not sure if they are equal, or wich to prefere?)&lt;/P&gt;
&lt;P&gt;But when comparing:
Name like 'Øyv%' 
or 
select if 'æ' = lower('Æ') then 'true' else 'false' end if
returns false&lt;/P&gt;
&lt;P&gt;How do we create a database that will store in UTF8 but sort and compare in norwegian?&lt;/P&gt;</description>
      <pubDate>Thu, 27 May 2021 14:26:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/create-a-norwegian-database/qaq-p/13827694</guid>
      <dc:creator>ovehalseth-1</dc:creator>
      <dc:date>2021-05-27T14:26:49Z</dc:date>
    </item>
    <item>
      <title>Re: Create a norwegian database</title>
      <link>https://community.sap.com/t5/technology-q-a/create-a-norwegian-database/qaa-p/13827697#M4858540</link>
      <description>&lt;P&gt;You may find someone with the answer... &lt;/P&gt;
&lt;P&gt;If not, consider what a collation-confused person such as myself might do: Perform experiments in which exactly one single variable/parameter/option is changed at a time, followed by all the tests that must be passed to certify "Success!".&lt;/P&gt;
&lt;P&gt;Experimental design may take longer than the experiments, but care is necessary to avoid backtracking, wandering, frustration and the inevitable production bugs.&lt;/P&gt;
&lt;P&gt;Some parameters to consider are ENCODING and Collation Tailoring Options.&lt;/P&gt;
&lt;P&gt;There is a lot of material in the V17 Help here &lt;A href="https://help.sap.com/viewer/61ecb3d4d8be4baaa07cc4db0ddb5d0a/17.0/en-US/813826126ce210149074e3a77d2e1dce.html"&gt;https://help.sap.com/viewer/61ecb3d4d8be4baaa07cc4db0ddb5d0a/17.0/en-US/813826126ce210149074e3a77d2e1dce.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;There have been related discussions in this forum and elsewhere so asking Auntie Google my yield fruit (but be careful of obsolete information).&lt;/P&gt;
&lt;P&gt;...and people who know the answer &lt;B&gt;do&lt;/B&gt; exist, it's just a matter of finding them &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 27 May 2021 16:03:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/create-a-norwegian-database/qaa-p/13827697#M4858540</guid>
      <dc:creator>Breck_Carter</dc:creator>
      <dc:date>2021-05-27T16:03:56Z</dc:date>
    </item>
    <item>
      <title>Re: Create a norwegian database</title>
      <link>https://community.sap.com/t5/technology-q-a/create-a-norwegian-database/qaa-p/13827695#M4858538</link>
      <description>&lt;P&gt;Just two questions/remarks:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;
&lt;P&gt;Do you use CHAR or NCHAR data types for those international texts? Because by default NCHAR data will use the UCA collation, which should work fine in your original database. However, if you are using CHAR data types and want to store international data, the default single byte character sets won't allow more than 256 char, obviously. If that limit is critical, you need to use UCA there, as well.&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;UTF8BIN is a multi-byte character set with binary sorting, so it by design treats each characters with and without accents or case as different. That is apparently not your goal.&lt;/P&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;If you want multi-byte characters both with CHAR and NCHAR, I guess the following should do:&lt;/P&gt;
&lt;PRE&gt;CREATE DATABASE 'norwegian.db' COLLATION 'UCA(locale=no;case=ignore;accent=ignore)' NCHAR COLLATION 'UCA(locale=no;case=ignore;accent=ignore)';
&lt;/PRE&gt;

&lt;P&gt;I can't tell whether the &lt;A href="http://dcx.sap.com/index.html#sqla170/en/html/3bcca7c76c5f1014a890f8644fd5d071.html"&gt;"collation tailoring options"&lt;/A&gt; do fit and whether Norwegian has particular sorting variants like German or Swedish (via sorttype=phonebook), so you might adjust that.&lt;/P&gt;
&lt;P&gt;Note that using the UCA collation by default uses UTF-8 as encoding.&lt;/P&gt;
&lt;P&gt;Just to add: Whether you need to distinguish between Bokmål and Nynorsk is fully out of my scope... &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 28 May 2021 03:03:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/create-a-norwegian-database/qaa-p/13827695#M4858538</guid>
      <dc:creator>VolkerBarth</dc:creator>
      <dc:date>2021-05-28T03:03:42Z</dc:date>
    </item>
    <item>
      <title>Re: Create a norwegian database</title>
      <link>https://community.sap.com/t5/technology-q-a/create-a-norwegian-database/qaa-p/13827696#M4858539</link>
      <description>&lt;P&gt;Hi.&lt;/P&gt;
&lt;P&gt;Try to use 1252NOR instead.
We always use that in our applications, and it has never created any issues for us.&lt;/P&gt;
&lt;P&gt;br,&lt;/P&gt;
&lt;P&gt;Bjarne Anker
Maritech Systems AS&lt;/P&gt;</description>
      <pubDate>Mon, 31 May 2021 07:41:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/create-a-norwegian-database/qaa-p/13827696#M4858539</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2021-05-31T07:41:26Z</dc:date>
    </item>
    <item>
      <title>Re: Create a norwegian database</title>
      <link>https://community.sap.com/t5/technology-q-a/create-a-norwegian-database/qaa-p/13827698#M4858541</link>
      <description>&lt;P&gt;Looks promising!
Tested:
set temporary option sort_collation='UCA(locale=nob;case=ignore;accent=ignore)';&lt;/P&gt;
&lt;P&gt;And got correct sorting, so will schedule a conversion of the database and see if it helps &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Oh, and I did not get locale=no to work, but locale=nob did work. I guess it stands for Norwegian Bokmål.
But then I would expect that locale=non for Nynorsk should work too, but it did not.&lt;/P&gt;
&lt;P&gt;But it does not matter as both sort the same.&lt;/P&gt;</description>
      <pubDate>Tue, 01 Jun 2021 08:10:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/create-a-norwegian-database/qaa-p/13827698#M4858541</guid>
      <dc:creator>ovehalseth-1</dc:creator>
      <dc:date>2021-06-01T08:10:35Z</dc:date>
    </item>
    <item>
      <title>Re: Create a norwegian database</title>
      <link>https://community.sap.com/t5/technology-q-a/create-a-norwegian-database/qaa-p/13827699#M4858542</link>
      <description>&lt;P&gt;Note, you can also "test collation sorting" without having to create a new database by using the COMPARE function and specifying the desired collation, see &lt;A href="https://sqlanywhere-forum.sap.com/questions/404"&gt;here&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;That does also help to compare results of different collation tailoring options side-by-side.&lt;/P&gt;</description>
      <pubDate>Tue, 01 Jun 2021 08:24:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/create-a-norwegian-database/qaa-p/13827699#M4858542</guid>
      <dc:creator>VolkerBarth</dc:creator>
      <dc:date>2021-06-01T08:24:48Z</dc:date>
    </item>
  </channel>
</rss>

