AminetAminet
Search:
78220 packages online
About
Recent
Browse
Search
Upload
Setup
Services

util/libs/UniLibDev.lha

Mirror:Random
Showing:ppc-morphosgeneric
No screenshot available
Short:Unicode code point/UTF-8 support lib
Author:Joerg van de Loo
Uploader:joergloo aol com
Type:util/libs
Version:5.14 (-beta-)
Replaces:util/libs/UniLibDev.lha
Requires:68020+ (m68k version)
Architecture:m68k-amigaos >= 2.0.4; ppc-amigaos; ppc-morphos
Date:2008-07-13
Download:http://aminet.net/util/libs/UniLibDev.lha - View contents
Readme:http://aminet.net/util/libs/UniLibDev.readme
Downloads:745
Foreword:
---------
With  the  ongoing  progress in development of MorphOS and AmigaOS4, also in
order  to  treat  UTF-8  no  longer  as  stepchild, I do hope that they will
render this library useless (no, I'm not kidding).
That  means  that you should first check whether there is support in your OS
for  a  certain  task and only in case not, you should fallback on functions
provided by Uni library. 
Unfortunately,  I  am  missing information about how far Unicode support has
been established in MorphOS 2.0 and for the upcoming OS4.1.


Introduction:
-------------
Uni  library is a support library for Unicode code points in range from 0 to
1'114'109  -  thus  not  limited to the Basic Multilingual Plane (range 0 to
65'535).
You    may    determine    code    point    attributes    (UPPERCASE_LETTER,
LOWERCASE_LETTER,  TITLECASE_LETTER  etc.) as well as you are able to change
these   attributes  for  a  code  point  (mapping  the  code  point  to  its
counterpart).

Because  I  haven't  found  a shared library with support functions that can
cover  UTF-8  strings,  I've  built  them into Uni Library as well, like for
example: UTF8StrCmp().

Furthermore,  transcoding  of  strings  from  one format to an other is also
implemented, like through: UTF16ToUTF8().


Thus, it's a shared library for three tasks:
    Determining code point attributes / mapping code points.
    Handling of UTF-8 multibyte sequences.
    Transcoding strings.


The  enclosed documentation was drawn up in HTML - and I spent a lot of time
in  order  to  clarify  some  misleading terms, which are frequently used by
people,  who  do not fully understand for what Unicode and its related terms
stand  for.  Okay,  I'm  not  an  expert  myself,  however,  please read the
documentation  I  provided before you study the API of this library; it will
be your benefit.


Changes:
-------
This  new  version of Uni library was upgraded in order to adopt the Unicode
Standard,  Version  5.1.0  character  encoding  scheme  as  published by the
Unicode Consortium and so far as my limited implementation can support it.

In  addition,  this  new  version  fixes  a  bug  which  surfaced  in case a
UTF-32/UTF-16  string was to be transcoded to UTF-8. The UTF-8 string buffer
had to be at least four bytes bigger than required (ouch...).

UniCodeChart()  supports  32  new  code charts and with that it supports 201
code charts in total.


Notes on transcoding singlebyte character encoding schemes:
-----------------------------------------------------------
I'll  release  an  additional  archive  (UniLibSupp  - already used by a 3rd
party)  that  shall make it easier for you to transcode strings by utilizing
IANA-IDs,  which  are  also used by the operating system's Locale library up
from version 50 (MorphOS, AmigaOS4).


Functions:
----------
The API provides these functions:

	Code Points Attribute Information

UniIsAlpha()
UniIsAttr()
UniIsCon()
UniIsDigit()
UniIsLower()
UniIsNSM()
UniIsPrint()
UniIsPunct()
UniIsSpace()
UniIsTitle()
UniIsUpper()

UniToLower()
UniToTitle()
UniToUpper()

UniCodeChart()

	UTF-8 String Information

UTF8IsLegal()
UTF8LegalStart()
UTF8NextChar()
UTF8PrevChar()
UTF8CharAtIndex()

UTF8StrInfo()
UTF8StrLen()
UTF8StrOfSize()
UTF8StrVisibleLen()

	UTF-8 String Comparison / Modifiers

UTF8StrCat()
UTF8StrCmp()
UTF8StrCmpI()
UTF8StrCpy()
UTF8StrFind()
UTF8StrMatch()
UTF8StrNCat()
UTF8StrNCmp()
UTF8StrNCmpI()
UTF8StrNCpy()
UTF8StrPaste()
UTF8StrReplace()
UTF8StrTerminate()
UTF8StrToken()
UTF8StrToLower()
UTF8StrToTitle()
UTF8StrToUpper()

	Miscellaneous (Wide Char) String Functions

UTF16StrLen()
UTF32StrLen()

UTF16CharAsUTF8Len()
UTF32CharAsUTF8Len()

	Transcodings

LatinToUTF8()
UTF8ToLatin()

UTF16ToUTF8()
UTF32ToUTF8()

UTF8ToUTF16()
UTF8ToUTF16Char()
UniResultIsSurrogate()
UTF8ToUTF32()
UTF8ToUTF32Char()

	Encodings

UniCheckEncoding()
UniBomHasSize()
UniSwitchEncoding()


Contents of util/libs/UniLibDev.lha
 PERMSSN    UID  GID    PACKED    SIZE  RATIO METHOD CRC     STAMP          NAME
---------- ----------- ------- ------- ------ ---------- ------------ -------------
[unknown]                  278     654  42.5% -lh5- c749 Oct 12  2007 UniLibDev.info
[unknown]                  277     628  44.1% -lh5- 20e7 Oct 12  2007 UniLibDev/Amiga-m68k.info
[unknown]                14232   51496  27.6% -lh5- 2494 Jul 11 14:11 UniLibDev/Amiga-m68k/uni.library
[unknown]                  276     628  43.9% -lh5- 9d54 Oct 12  2007 UniLibDev/Amiga-PPC.info
[unknown]                19412   75316  25.8% -lh5- 62c4 Jul 11 14:11 UniLibDev/Amiga-PPC/uni.library
[unknown]                  277     628  44.1% -lh5- 701e Oct 12  2007 UniLibDev/doc.info
[unknown]                  790    6345  12.5% -lh5- c5ef Oct 12  2007 UniLibDev/doc/files/image/bg_big.png
[unknown]                 4080    4339  94.0% -lh5- 0b7f Oct 12  2007 UniLibDev/doc/files/image/glyph-trans.png
[unknown]                 2075   11211  18.5% -lh5- 186f Oct 12  2007 UniLibDev/doc/files/LatinToUTF8.html
[unknown]                  931    6109  15.2% -lh5- 0b41 Oct 12  2007 UniLibDev/doc/files/UniBomHasSize.html
[unknown]                 2183    8902  24.5% -lh5- 7bb9 Oct 12  2007 UniLibDev/doc/files/UniCheckEncoding.html
[unknown]                 2074    9051  22.9% -lh5- 5625 Jul 11 14:11 UniLibDev/doc/files/UniCodeChart.html
[unknown]                  968    6110  15.8% -lh5- d1a2 Oct 12  2007 UniLibDev/doc/files/UniIsAlpha.html
[unknown]                  960    6082  15.8% -lh5- 448e Oct 12  2007 UniLibDev/doc/files/UniIsAttr.html
[unknown]                  937    6018  15.6% -lh5- 08f8 Oct 12  2007 UniLibDev/doc/files/UniIsCon.html
[unknown]                  941    6027  15.6% -lh5- 35de Oct 12  2007 UniLibDev/doc/files/UniIsDigit.html
[unknown]                  982    6141  16.0% -lh5- adf7 Oct 12  2007 UniLibDev/doc/files/UniIsLower.html
[unknown]                  937    6013  15.6% -lh5- 6c7b Oct 12  2007 UniLibDev/doc/files/UniIsNSM.html
[unknown]                 1001    6171  16.2% -lh5- 9f35 Oct 12  2007 UniLibDev/doc/files/UniIsPrint.html
[unknown]                  986    6180  16.0% -lh5- 7228 Oct 12  2007 UniLibDev/doc/files/UniIsPunct.html
[unknown]                  955    6073  15.7% -lh5- 29d5 Oct 12  2007 UniLibDev/doc/files/UniIsSpace.html
[unknown]                  981    6141  16.0% -lh5- 2970 Oct 12  2007 UniLibDev/doc/files/UniIsTitle.html
[unknown]                  982    6141  16.0% -lh5- 972f Oct 12  2007 UniLibDev/doc/files/UniIsUpper.html
[unknown]                  924    6102  15.1% -lh5- 1e5d Oct 12  2007 UniLibDev/doc/files/UniResultIsSurrogate.html
[unknown]                 1480    7385  20.0% -lh5- 348c Oct 12  2007 UniLibDev/doc/files/UniSwitchEncoding.html
[unknown]                  950    6138  15.5% -lh5- ae33 Oct 12  2007 UniLibDev/doc/files/UniToLower.html
[unknown]                 1116    6472  17.2% -lh5- 92e4 Oct 12  2007 UniLibDev/doc/files/UniToTitle.html
[unknown]                  945    6117  15.4% -lh5- 3b0e Oct 12  2007 UniLibDev/doc/files/UniToUpper.html
[unknown]                  937    6065  15.4% -lh5- 8e7a Oct 12  2007 UniLibDev/doc/files/UTF16CharAsUTF8Len.html
[unknown]                  873    5978  14.6% -lh5- 8332 Oct 12  2007 UniLibDev/doc/files/UTF16StrLen.html
[unknown]                 1221    6791  18.0% -lh5- 550f Oct 12  2007 UniLibDev/doc/files/UTF16ToUTF8.html
[unknown]                  894    6001  14.9% -lh5- 8211 Oct 12  2007 UniLibDev/doc/files/UTF32CharAsUTF8Len.html
[unknown]                  872    5981  14.6% -lh5- d3cc Oct 12  2007 UniLibDev/doc/files/UTF32StrLen.html
[unknown]                 1231    6806  18.1% -lh5- 6e2d Oct 12  2007 UniLibDev/doc/files/UTF32ToUTF8.html
[unknown]                 1112    7157  15.5% -lh5- 9da5 Oct 12  2007 UniLibDev/doc/files/UTF8CharAtIndex.html
[unknown]                  904    5968  15.1% -lh5- 5bcb Oct 12  2007 UniLibDev/doc/files/UTF8IsLegal.html
[unknown]                  930    6033  15.4% -lh5- ec45 Oct 12  2007 UniLibDev/doc/files/UTF8LegalStart.html
[unknown]                  949    6055  15.7% -lh5- 9c6d Oct 12  2007 UniLibDev/doc/files/UTF8NextChar.html
[unknown]                 1108    6482  17.1% -lh5- 8466 Oct 12  2007 UniLibDev/doc/files/UTF8PrevChar.html
[unknown]                  971    6129  15.8% -lh5- 3189 Oct 12  2007 UniLibDev/doc/files/UTF8StrCat.html
[unknown]                  904    6115  14.8% -lh5- 481c Oct 12  2007 UniLibDev/doc/files/UTF8StrCmp.html
[unknown]                  906    6120  14.8% -lh5- 94b1 Oct 12  2007 UniLibDev/doc/files/UTF8StrCmpI.html
[unknown]                 1148    6522  17.6% -lh5- 069a Oct 12  2007 UniLibDev/doc/files/UTF8StrCpy.html
[unknown]                 1212    6766  17.9% -lh5- a15e Oct 12  2007 UniLibDev/doc/files/UTF8StrFind.html
[unknown]                 1336    7547  17.7% -lh5- c6b0 Oct 12  2007 UniLibDev/doc/files/UTF8StrInfo.html
[unknown]                  960    6236  15.4% -lh5- 512b Oct 12  2007 UniLibDev/doc/files/UTF8StrLen.html
[unknown]                 3218   12943  24.9% -lh5- 77f1 Oct 12  2007 UniLibDev/doc/files/UTF8StrMatch.html
[unknown]                 1003    6211  16.1% -lh5- 763d Oct 12  2007 UniLibDev/doc/files/UTF8StrNCat.html
[unknown]                 1010    6382  15.8% -lh5- d026 Oct 12  2007 UniLibDev/doc/files/UTF8StrNCmp.html
[unknown]                 1012    6387  15.8% -lh5- 8842 Oct 12  2007 UniLibDev/doc/files/UTF8StrNCmpI.html
[unknown]                 1571    7768  20.2% -lh5- 74a1 Oct 12  2007 UniLibDev/doc/files/UTF8StrNCpy.html
[unknown]                 1011    6329  16.0% -lh5- 1a46 Oct 12  2007 UniLibDev/doc/files/UTF8StrOfSize.html
[unknown]                 1910    8465  22.6% -lh5- dca7 Oct 12  2007 UniLibDev/doc/files/UTF8StrPaste.html
[unknown]                 1912    9829  19.5% -lh5- 1022 Oct 12  2007 UniLibDev/doc/files/UTF8StrReplace.html
[unknown]                 1101    6476  17.0% -lh5- 5861 Oct 12  2007 UniLibDev/doc/files/UTF8StrTerminate.html
[unknown]                 1652    9547  17.3% -lh5- c967 Oct 12  2007 UniLibDev/doc/files/UTF8StrToken.html
[unknown]                 1004    6365  15.8% -lh5- 087d Oct 12  2007 UniLibDev/doc/files/UTF8StrToLower.html
[unknown]                 1182    6704  17.6% -lh5- c8cc Oct 12  2007 UniLibDev/doc/files/UTF8StrToTitle.html
[unknown]                 1004    6365  15.8% -lh5- 8ee6 Oct 12  2007 UniLibDev/doc/files/UTF8StrToUpper.html
[unknown]                 1083    6455  16.8% -lh5- ec40 Oct 12  2007 UniLibDev/doc/files/UTF8StrVisibleLen.html
[unknown]                 3553   18636  19.1% -lh5- 83cf Oct 12  2007 UniLibDev/doc/files/UTF8ToLatin.html
[unknown]                 1370    7161  19.1% -lh5- 9e62 Oct 12  2007 UniLibDev/doc/files/UTF8ToUTF16.html
[unknown]                 1413    7237  19.5% -lh5- 56bb Oct 12  2007 UniLibDev/doc/files/UTF8ToUTF16Char.html
[unknown]                 1378    7172  19.2% -lh5- 0e87 Oct 12  2007 UniLibDev/doc/files/UTF8ToUTF32.html
[unknown]                 1305    6945  18.8% -lh5- 3f15 Oct 12  2007 UniLibDev/doc/files/UTF8ToUTF32Char.html
[unknown]                 1918    6769  28.3% -lh5- 0681 Jul 11 14:11 UniLibDev/doc/index.html
[unknown]                 2720    3387  80.3% -lh5- 1e78 Oct 12  2007 UniLibDev/doc/index.html.info
[unknown]                 1120    2313  48.4% -lh5- 3b14 Oct 12  2007 UniLibDev/doc/miscellaneous/casing.html
[unknown]                  948    1932  49.1% -lh5- 699c Jul 11 14:11 UniLibDev/doc/miscellaneous/copyright.html
[unknown]                 2172   10695  20.3% -lh5- 97df Oct 12  2007 UniLibDev/doc/miscellaneous/example.html
[unknown]                  950    1937  49.0% -lh5- 3ec4 Oct 12  2007 UniLibDev/doc/miscellaneous/foreword.html
[unknown]                 1110    2146  51.7% -lh5- 432f Oct 12  2007 UniLibDev/doc/miscellaneous/forwhom.html
[unknown]                 1710    3650  46.8% -lh5- 755f Oct 12  2007 UniLibDev/doc/miscellaneous/idetails.html
[unknown]                 2331    5633  41.4% -lh5- aa8c Oct 12  2007 UniLibDev/doc/miscellaneous/light.html
[unknown]                 3985   13754  29.0% -lh5- 8d5c Oct 12  2007 UniLibDev/doc/miscellaneous/terms.html
[unknown]                  270     628  43.0% -lh5- ebaa Oct 12  2007 UniLibDev/include.info
[unknown]                 1498    8059  18.6% -lh5- ee58 Oct 12  2007 UniLibDev/include/amigaos3/gg/os-include/inline/uni.h
[unknown]                  497    1546  32.1% -lh5- 81d1 Oct 12  2007 UniLibDev/include/amigaos3/gg/os-include/proto/uni.h
[unknown]                 1862   12130  15.4% -lh5- 44d6 Oct 12  2007 UniLibDev/include/amigaos3/vincludeos3/inline/uni_protos.h
[unknown]                  497    1546  32.1% -lh5- 81d1 Oct 12  2007 UniLibDev/include/amigaos3/vincludeos3/proto/uni.h
[unknown]                 1198    4729  25.3% -lh5- b5e4 Oct 12  2007 UniLibDev/include/amigaos4/inline4/uni.h
[unknown]                 1051    5830  18.0% -lh5- a619 Oct 12  2007 UniLibDev/include/amigaos4/interfaces/uni.h
[unknown]                  958    3436  27.9% -lh5- 452b Oct 12  2007 UniLibDev/include/clib/uni_protos.h
[unknown]                  889    4643  19.1% -lh5- e466 Oct 12  2007 UniLibDev/include/Install.txt
[unknown]                 1665    3918  42.5% -lh5- 5787 Oct 12  2007 UniLibDev/include/libraries/uni.h
[unknown]                 1575   11152  14.1% -lh5- e56c Oct 12  2007 UniLibDev/include/morphos/gg/os-include/ppcinline/uni.h
[unknown]                  497    1546  32.1% -lh5- 81d1 Oct 12  2007 UniLibDev/include/morphos/gg/os-include/proto/uni.h
[unknown]                 2038   16506  12.3% -lh5- 0304 Oct 12  2007 UniLibDev/include/morphos/vincludemos/inline/uni_protos.h
[unknown]                  497    1546  32.1% -lh5- 81d1 Oct 12  2007 UniLibDev/include/morphos/vincludemos/proto/uni.h
[unknown]                 1217    6525  18.7% -lh5- edb4 Oct 12  2007 UniLibDev/include/pragma/uni_lib.h
[unknown]                  497    1546  32.1% -lh5- 81d1 Oct 12  2007 UniLibDev/include/proto/uni.h
[unknown]                  282     628  44.9% -lh5- ca40 Oct 12  2007 UniLibDev/MorphOS.info
[unknown]                17202   67692  25.4% -lh5- d302 Jul 11 14:26 UniLibDev/MorphOS/uni.library
[unknown]                  868    1672  51.9% -lh5- 29de Jul 11 14:11 UniLibDev/readme
[unknown]                 1810    2773  65.3% -lh5- b7e8 Oct 12  2007 UniLibDev/README.info
[unknown]                11887   58122  20.5% -lh5- 6c05 Oct 12  2007 UniLibDev/sample.txt
[unknown]                  811    1363  59.5% -lh5- aa04 Oct 12  2007 UniLibDev/sample.txt.info
[unknown]                  270     628  43.0% -lh5- 0ec3 Oct 12  2007 UniLibDev/SFD.info
[unknown]                 1220    4282  28.5% -lh5- 9b28 Oct 12  2007 UniLibDev/SFD/uni_lib.sfd
[unknown]                  901    1535  58.7% -lh5- e400 Oct 12  2007 UniLibDev/SFD/uni_lib.sfd.info
[unknown]                  274     628  43.6% -lh5- c254 Oct 12  2007 UniLibDev/tools.info
[unknown]                 3969   10464  37.9% -lh5- 90bd Jun 11 14:11 UniLibDev/tools/Histogram.c
[unknown]                 1937    2466  78.5% -lh5- e9e3 Jun 11 14:11 UniLibDev/tools/Histogram.c.info
[unknown]                  959    2011  47.7% -lh5- c2d3 Oct 12  2007 UniLibDev/tools/Histogram.html
[unknown]                 2717    3387  80.2% -lh5- 0e9d Oct 12  2007 UniLibDev/tools/Histogram.html.info
[unknown]                 5640    9428  59.8% -lh5- 4335 Jul 11 14:11 UniLibDev/tools/Histogram_68k
[unknown]                 6440   14900  43.2% -lh5- 9102 Jul 11 14:11 UniLibDev/tools/Histogram_MorphOS
[unknown]                 6298   14420  43.7% -lh5- 0a5d Jul 11 14:11 UniLibDev/tools/Histogram_OS4
[unknown]                11928   37138  32.1% -lh5- 81cd Oct 12  2007 UniLibDev/tools/Transcoder.c
[unknown]                 1940    2466  78.7% -lh5- 4fb6 Oct 12  2007 UniLibDev/tools/Transcoder.c.info
[unknown]                 2668    6976  38.2% -lh5- d8cb Oct 12  2007 UniLibDev/tools/Transcoder.html
[unknown]                 2721    3387  80.3% -lh5- 00ca Oct 12  2007 UniLibDev/tools/Transcoder.html.info
[unknown]                 8307   16792  49.5% -lh5- 0b99 Oct 12  2007 UniLibDev/tools/Transcoder_68k
[unknown]                 1458    2373  61.4% -lh5- 6a16 Oct 12  2007 UniLibDev/tools/Transcoder_68k.info
[unknown]                 3545   28531  12.4% -lh5- 9272 Oct 12  2007 UniLibDev/tools/Transcoder_data.c
[unknown]                 1918    2466  77.8% -lh5- 25c1 Oct 12  2007 UniLibDev/tools/Transcoder_data.c.info
[unknown]                10107   24352  41.5% -lh5- e2ed Oct 12  2007 UniLibDev/tools/Transcoder_MorphOS
[unknown]                 1249    2628  47.5% -lh5- a4ec Oct 12  2007 UniLibDev/tools/Transcoder_MorphOS.info
[unknown]                10011   23036  43.5% -lh5- cc4f Oct 12  2007 UniLibDev/tools/Transcoder_OS4
[unknown]                 9384   18140  51.7% -lh5- af0c Jul 11 14:11 UniLibDev/UniTest
[unknown]                 6299   22722  27.7% -lh5- dfc8 Jul 11 14:11 UniLibDev/UniTest.c
[unknown]                 1765    2283  77.3% -lh5- 459a Oct 12  2007 UniLibDev/UniTest.c.info
[unknown]                 1478    2389  61.9% -lh5- b1c1 Jul 11 14:11 UniLibDev/UniTest.info
---------- ----------- ------- ------- ------ ---------- ------------ -------------
 Total       123 files  284023 1072327  26.5%            Jul 13 08:42

Aminet © 1992-2008 Urban Müller and the Aminet team. Aminet contact address: <aminetaminet net>