From 58210085e13a452937573a817c150a9671b5cabf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Karmaz=C3=ADn?= Date: Wed, 18 Sep 2024 18:49:59 +0200 Subject: [PATCH] Rename the rest of CPxxx charsets to IBMxxx --- README.md | 4 ++-- .../cz/multiplatform/escpos4k/core/CommandBuilder.kt | 12 ++++++------ .../core/encoding/charset/{CP775.kt => IBM775.kt} | 2 +- .../core/encoding/charset/{CP852.kt => IBM852.kt} | 2 +- .../core/encoding/charset/{CP855.kt => IBM855.kt} | 2 +- .../core/encoding/charset/{CP857.kt => IBM857.kt} | 2 +- .../core/encoding/charset/{CP858.kt => IBM858.kt} | 2 +- .../core/encoding/charset/{CP860.kt => IBM860.kt} | 2 +- .../core/encoding/charset/{CP861.kt => IBM861.kt} | 2 +- .../core/encoding/charset/{CP862.kt => IBM862.kt} | 2 +- .../core/encoding/charset/{CP863.kt => IBM863.kt} | 2 +- .../core/encoding/charset/{CP864.kt => IBM864.kt} | 2 +- .../core/encoding/charset/{CP865.kt => IBM865.kt} | 2 +- .../core/encoding/charset/{CP866.kt => IBM866.kt} | 2 +- .../core/encoding/charset/{CP869.kt => IBM869.kt} | 2 +- 15 files changed, 21 insertions(+), 21 deletions(-) rename escpos4k/src/commonMain/kotlin/cz/multiplatform/escpos4k/core/encoding/charset/{CP775.kt => IBM775.kt} (98%) rename escpos4k/src/commonMain/kotlin/cz/multiplatform/escpos4k/core/encoding/charset/{CP852.kt => IBM852.kt} (98%) rename escpos4k/src/commonMain/kotlin/cz/multiplatform/escpos4k/core/encoding/charset/{CP855.kt => IBM855.kt} (98%) rename escpos4k/src/commonMain/kotlin/cz/multiplatform/escpos4k/core/encoding/charset/{CP857.kt => IBM857.kt} (98%) rename escpos4k/src/commonMain/kotlin/cz/multiplatform/escpos4k/core/encoding/charset/{CP858.kt => IBM858.kt} (98%) rename escpos4k/src/commonMain/kotlin/cz/multiplatform/escpos4k/core/encoding/charset/{CP860.kt => IBM860.kt} (98%) rename escpos4k/src/commonMain/kotlin/cz/multiplatform/escpos4k/core/encoding/charset/{CP861.kt => IBM861.kt} (98%) rename escpos4k/src/commonMain/kotlin/cz/multiplatform/escpos4k/core/encoding/charset/{CP862.kt => IBM862.kt} (98%) rename escpos4k/src/commonMain/kotlin/cz/multiplatform/escpos4k/core/encoding/charset/{CP863.kt => IBM863.kt} (98%) rename escpos4k/src/commonMain/kotlin/cz/multiplatform/escpos4k/core/encoding/charset/{CP864.kt => IBM864.kt} (98%) rename escpos4k/src/commonMain/kotlin/cz/multiplatform/escpos4k/core/encoding/charset/{CP865.kt => IBM865.kt} (98%) rename escpos4k/src/commonMain/kotlin/cz/multiplatform/escpos4k/core/encoding/charset/{CP866.kt => IBM866.kt} (98%) rename escpos4k/src/commonMain/kotlin/cz/multiplatform/escpos4k/core/encoding/charset/{CP869.kt => IBM869.kt} (98%) diff --git a/README.md b/README.md index d482d0e..be7f20d 100644 --- a/README.md +++ b/README.md @@ -37,12 +37,12 @@ suspend fun awaitPrint(): MyError? { val libraryError: PrintError? = connection.print(configuration) { // (2) // MULTIPLE TEXT ALIGNMENTS PER LINE line("Famous bridges:") - charset(Charset.CP865) // Can encode Ø, but not ů + charset(IBM865) // Can encode Ø, but not ů segmentedLine( LineSegment("Øresundsbroen", TextAlignment.LEFT), LineSegment("7845m", TextAlignment.RIGHT), ) - charset(Charset.CP852) // Can encode ů, but not Ø + charset(IBM852) // Can encode ů, but not Ø segmentedLine( LineSegment("Karlův most", TextAlignment.LEFT), LineSegment("515m", TextAlignment.RIGHT), diff --git a/escpos4k/src/commonMain/kotlin/cz/multiplatform/escpos4k/core/CommandBuilder.kt b/escpos4k/src/commonMain/kotlin/cz/multiplatform/escpos4k/core/CommandBuilder.kt index 019c832..adcfd10 100644 --- a/escpos4k/src/commonMain/kotlin/cz/multiplatform/escpos4k/core/CommandBuilder.kt +++ b/escpos4k/src/commonMain/kotlin/cz/multiplatform/escpos4k/core/CommandBuilder.kt @@ -44,9 +44,9 @@ import cz.multiplatform.escpos4k.core.encoding.charset.Charset * val builder = CommandBuilder(defaultConfig) { * // Charsets * line("Famous bridges:") - * charset(Charset.CP865) // Can encode Ø, but not ů + * charset(IBM865) // Can encode Ø, but not ů * line("Øresundsbroen: 7845m") - * charset(Charset.CP852) // Can encode ů, but not Ø + * charset(IBM852) // Can encode ů, but not Ø * line("Karlův most: 515m") * * // Text style - temporary style builder @@ -163,10 +163,10 @@ public class CommandBuilder( * printer.print { * line("Famous bridges:") * - * charset(Charset.CP865) // Can encode Ø, but not ů + * charset(IBM865) // Can encode Ø, but not ů * line("Øresundsbroen: 7845m") * - * charset(Charset.CP852) // Can encode ů, but not Ø + * charset(IBM852) // Can encode ů, but not Ø * line("Karlův most: 515m") * } * ``` @@ -193,10 +193,10 @@ public class CommandBuilder( * line("Famous bridges") * * // 865 can encode Ø, but not ů - * charset(Charset.CP865) + * charset(IBM865) * line("Øresundsbroen: 7845m") * - * withCharset(Charset.CP852) { + * withCharset(IBM852) { * // 852 can encode ů, but not Ø * line("Karlův most: 515m") * } diff --git a/escpos4k/src/commonMain/kotlin/cz/multiplatform/escpos4k/core/encoding/charset/CP775.kt b/escpos4k/src/commonMain/kotlin/cz/multiplatform/escpos4k/core/encoding/charset/IBM775.kt similarity index 98% rename from escpos4k/src/commonMain/kotlin/cz/multiplatform/escpos4k/core/encoding/charset/CP775.kt rename to escpos4k/src/commonMain/kotlin/cz/multiplatform/escpos4k/core/encoding/charset/IBM775.kt index 2a2211f..e570214 100644 --- a/escpos4k/src/commonMain/kotlin/cz/multiplatform/escpos4k/core/encoding/charset/CP775.kt +++ b/escpos4k/src/commonMain/kotlin/cz/multiplatform/escpos4k/core/encoding/charset/IBM775.kt @@ -17,7 +17,7 @@ package cz.multiplatform.escpos4k.core.encoding.charset /** Page 33 [CP775: Baltic Rim] */ -public data object CP775 : Charset(33, "IBM775") { +public data object IBM775 : Charset(33, "IBM775") { override val mapping: Map = mapOf( '\u0106' to 0x80, diff --git a/escpos4k/src/commonMain/kotlin/cz/multiplatform/escpos4k/core/encoding/charset/CP852.kt b/escpos4k/src/commonMain/kotlin/cz/multiplatform/escpos4k/core/encoding/charset/IBM852.kt similarity index 98% rename from escpos4k/src/commonMain/kotlin/cz/multiplatform/escpos4k/core/encoding/charset/CP852.kt rename to escpos4k/src/commonMain/kotlin/cz/multiplatform/escpos4k/core/encoding/charset/IBM852.kt index 96a836e..40fba48 100644 --- a/escpos4k/src/commonMain/kotlin/cz/multiplatform/escpos4k/core/encoding/charset/CP852.kt +++ b/escpos4k/src/commonMain/kotlin/cz/multiplatform/escpos4k/core/encoding/charset/IBM852.kt @@ -17,7 +17,7 @@ package cz.multiplatform.escpos4k.core.encoding.charset /** Page 18 [CP852: Latin 2] */ -public data object CP852 : Charset(18, "IBM852") { +public data object IBM852 : Charset(18, "IBM852") { override val mapping: Map = mapOf( '\u00C7' to 0x80, diff --git a/escpos4k/src/commonMain/kotlin/cz/multiplatform/escpos4k/core/encoding/charset/CP855.kt b/escpos4k/src/commonMain/kotlin/cz/multiplatform/escpos4k/core/encoding/charset/IBM855.kt similarity index 98% rename from escpos4k/src/commonMain/kotlin/cz/multiplatform/escpos4k/core/encoding/charset/CP855.kt rename to escpos4k/src/commonMain/kotlin/cz/multiplatform/escpos4k/core/encoding/charset/IBM855.kt index 1f8835f..d3beef9 100644 --- a/escpos4k/src/commonMain/kotlin/cz/multiplatform/escpos4k/core/encoding/charset/CP855.kt +++ b/escpos4k/src/commonMain/kotlin/cz/multiplatform/escpos4k/core/encoding/charset/IBM855.kt @@ -17,7 +17,7 @@ package cz.multiplatform.escpos4k.core.encoding.charset /** Page 34 [CP855: Cyrillic] */ -public data object CP855 : Charset(34, "IBM855") { +public data object IBM855 : Charset(34, "IBM855") { override val mapping: Map = mapOf( '\u0452' to 0x80, diff --git a/escpos4k/src/commonMain/kotlin/cz/multiplatform/escpos4k/core/encoding/charset/CP857.kt b/escpos4k/src/commonMain/kotlin/cz/multiplatform/escpos4k/core/encoding/charset/IBM857.kt similarity index 98% rename from escpos4k/src/commonMain/kotlin/cz/multiplatform/escpos4k/core/encoding/charset/CP857.kt rename to escpos4k/src/commonMain/kotlin/cz/multiplatform/escpos4k/core/encoding/charset/IBM857.kt index 122016f..9094672 100644 --- a/escpos4k/src/commonMain/kotlin/cz/multiplatform/escpos4k/core/encoding/charset/CP857.kt +++ b/escpos4k/src/commonMain/kotlin/cz/multiplatform/escpos4k/core/encoding/charset/IBM857.kt @@ -17,7 +17,7 @@ package cz.multiplatform.escpos4k.core.encoding.charset /** Page 13 [CP857: Turkish] */ -public data object CP857 : Charset(13, "IBM857") { +public data object IBM857 : Charset(13, "IBM857") { override val mapping: Map = mapOf( '\u00C7' to 0x80, diff --git a/escpos4k/src/commonMain/kotlin/cz/multiplatform/escpos4k/core/encoding/charset/CP858.kt b/escpos4k/src/commonMain/kotlin/cz/multiplatform/escpos4k/core/encoding/charset/IBM858.kt similarity index 98% rename from escpos4k/src/commonMain/kotlin/cz/multiplatform/escpos4k/core/encoding/charset/CP858.kt rename to escpos4k/src/commonMain/kotlin/cz/multiplatform/escpos4k/core/encoding/charset/IBM858.kt index 53d24e6..ba33442 100644 --- a/escpos4k/src/commonMain/kotlin/cz/multiplatform/escpos4k/core/encoding/charset/CP858.kt +++ b/escpos4k/src/commonMain/kotlin/cz/multiplatform/escpos4k/core/encoding/charset/IBM858.kt @@ -17,7 +17,7 @@ package cz.multiplatform.escpos4k.core.encoding.charset /** Page 19 [CP858: Euro] */ -public data object CP858 : Charset(19, "IBM00858") { // Note: two leading zeros +public data object IBM858 : Charset(19, "IBM00858") { // Note: two leading zeros override val mapping: Map = mapOf( '\u00C7' to 0x80, diff --git a/escpos4k/src/commonMain/kotlin/cz/multiplatform/escpos4k/core/encoding/charset/CP860.kt b/escpos4k/src/commonMain/kotlin/cz/multiplatform/escpos4k/core/encoding/charset/IBM860.kt similarity index 98% rename from escpos4k/src/commonMain/kotlin/cz/multiplatform/escpos4k/core/encoding/charset/CP860.kt rename to escpos4k/src/commonMain/kotlin/cz/multiplatform/escpos4k/core/encoding/charset/IBM860.kt index 35f9fab..c084ec0 100644 --- a/escpos4k/src/commonMain/kotlin/cz/multiplatform/escpos4k/core/encoding/charset/CP860.kt +++ b/escpos4k/src/commonMain/kotlin/cz/multiplatform/escpos4k/core/encoding/charset/IBM860.kt @@ -17,7 +17,7 @@ package cz.multiplatform.escpos4k.core.encoding.charset /** Page 3 [CP860: Portuguese] */ -public data object CP860 : Charset(3, "IBM860") { +public data object IBM860 : Charset(3, "IBM860") { override val mapping: Map = mapOf( '\u00C7' to 0x80, diff --git a/escpos4k/src/commonMain/kotlin/cz/multiplatform/escpos4k/core/encoding/charset/CP861.kt b/escpos4k/src/commonMain/kotlin/cz/multiplatform/escpos4k/core/encoding/charset/IBM861.kt similarity index 98% rename from escpos4k/src/commonMain/kotlin/cz/multiplatform/escpos4k/core/encoding/charset/CP861.kt rename to escpos4k/src/commonMain/kotlin/cz/multiplatform/escpos4k/core/encoding/charset/IBM861.kt index df0fd08..958f811 100644 --- a/escpos4k/src/commonMain/kotlin/cz/multiplatform/escpos4k/core/encoding/charset/CP861.kt +++ b/escpos4k/src/commonMain/kotlin/cz/multiplatform/escpos4k/core/encoding/charset/IBM861.kt @@ -17,7 +17,7 @@ package cz.multiplatform.escpos4k.core.encoding.charset /** Page 35 [CP861: Icelandic] */ -public data object CP861 : Charset(35, "IBM861") { +public data object IBM861 : Charset(35, "IBM861") { override val mapping: Map = mapOf( '\u00C7' to 0x80, diff --git a/escpos4k/src/commonMain/kotlin/cz/multiplatform/escpos4k/core/encoding/charset/CP862.kt b/escpos4k/src/commonMain/kotlin/cz/multiplatform/escpos4k/core/encoding/charset/IBM862.kt similarity index 98% rename from escpos4k/src/commonMain/kotlin/cz/multiplatform/escpos4k/core/encoding/charset/CP862.kt rename to escpos4k/src/commonMain/kotlin/cz/multiplatform/escpos4k/core/encoding/charset/IBM862.kt index b3cc947..771fe71 100644 --- a/escpos4k/src/commonMain/kotlin/cz/multiplatform/escpos4k/core/encoding/charset/CP862.kt +++ b/escpos4k/src/commonMain/kotlin/cz/multiplatform/escpos4k/core/encoding/charset/IBM862.kt @@ -17,7 +17,7 @@ package cz.multiplatform.escpos4k.core.encoding.charset /** Page 36 [CP862: Hebrew] */ -public data object CP862 : Charset(36, "IBM862") { +public data object IBM862 : Charset(36, "IBM862") { override val mapping: Map = mapOf( '\u05D0' to 0x80, diff --git a/escpos4k/src/commonMain/kotlin/cz/multiplatform/escpos4k/core/encoding/charset/CP863.kt b/escpos4k/src/commonMain/kotlin/cz/multiplatform/escpos4k/core/encoding/charset/IBM863.kt similarity index 98% rename from escpos4k/src/commonMain/kotlin/cz/multiplatform/escpos4k/core/encoding/charset/CP863.kt rename to escpos4k/src/commonMain/kotlin/cz/multiplatform/escpos4k/core/encoding/charset/IBM863.kt index 4a39360..f8fbcaa 100644 --- a/escpos4k/src/commonMain/kotlin/cz/multiplatform/escpos4k/core/encoding/charset/CP863.kt +++ b/escpos4k/src/commonMain/kotlin/cz/multiplatform/escpos4k/core/encoding/charset/IBM863.kt @@ -17,7 +17,7 @@ package cz.multiplatform.escpos4k.core.encoding.charset /** Page 4 [CP863: Canadian-French] */ -public data object CP863 : Charset(4, "IBM863") { +public data object IBM863 : Charset(4, "IBM863") { override val mapping: Map = mapOf( '\u00C7' to 0x80, diff --git a/escpos4k/src/commonMain/kotlin/cz/multiplatform/escpos4k/core/encoding/charset/CP864.kt b/escpos4k/src/commonMain/kotlin/cz/multiplatform/escpos4k/core/encoding/charset/IBM864.kt similarity index 98% rename from escpos4k/src/commonMain/kotlin/cz/multiplatform/escpos4k/core/encoding/charset/CP864.kt rename to escpos4k/src/commonMain/kotlin/cz/multiplatform/escpos4k/core/encoding/charset/IBM864.kt index bfc727a..681b982 100644 --- a/escpos4k/src/commonMain/kotlin/cz/multiplatform/escpos4k/core/encoding/charset/CP864.kt +++ b/escpos4k/src/commonMain/kotlin/cz/multiplatform/escpos4k/core/encoding/charset/IBM864.kt @@ -17,7 +17,7 @@ package cz.multiplatform.escpos4k.core.encoding.charset /** Page 37 [CP864: Arabic] */ -public data object CP864 : Charset(37, "IBM864") { +public data object IBM864 : Charset(37, "IBM864") { override val mapping: Map = mapOf( '\u00B0' to 0x80, diff --git a/escpos4k/src/commonMain/kotlin/cz/multiplatform/escpos4k/core/encoding/charset/CP865.kt b/escpos4k/src/commonMain/kotlin/cz/multiplatform/escpos4k/core/encoding/charset/IBM865.kt similarity index 98% rename from escpos4k/src/commonMain/kotlin/cz/multiplatform/escpos4k/core/encoding/charset/CP865.kt rename to escpos4k/src/commonMain/kotlin/cz/multiplatform/escpos4k/core/encoding/charset/IBM865.kt index d00dfd6..d6efbee 100644 --- a/escpos4k/src/commonMain/kotlin/cz/multiplatform/escpos4k/core/encoding/charset/CP865.kt +++ b/escpos4k/src/commonMain/kotlin/cz/multiplatform/escpos4k/core/encoding/charset/IBM865.kt @@ -17,7 +17,7 @@ package cz.multiplatform.escpos4k.core.encoding.charset /** Page 5 [CP865: Nordic] */ -public data object CP865 : Charset(5, "IBM865") { +public data object IBM865 : Charset(5, "IBM865") { override val mapping: Map = mapOf( '\u00C7' to 0x80, diff --git a/escpos4k/src/commonMain/kotlin/cz/multiplatform/escpos4k/core/encoding/charset/CP866.kt b/escpos4k/src/commonMain/kotlin/cz/multiplatform/escpos4k/core/encoding/charset/IBM866.kt similarity index 98% rename from escpos4k/src/commonMain/kotlin/cz/multiplatform/escpos4k/core/encoding/charset/CP866.kt rename to escpos4k/src/commonMain/kotlin/cz/multiplatform/escpos4k/core/encoding/charset/IBM866.kt index ae3c90d..4610c37 100644 --- a/escpos4k/src/commonMain/kotlin/cz/multiplatform/escpos4k/core/encoding/charset/CP866.kt +++ b/escpos4k/src/commonMain/kotlin/cz/multiplatform/escpos4k/core/encoding/charset/IBM866.kt @@ -17,7 +17,7 @@ package cz.multiplatform.escpos4k.core.encoding.charset /** Page 17 [CP866: Cyrillic #2] */ -public data object CP866 : Charset(17, "IBM866") { +public data object IBM866 : Charset(17, "IBM866") { override val mapping: Map = mapOf( '\u0410' to 0x80, diff --git a/escpos4k/src/commonMain/kotlin/cz/multiplatform/escpos4k/core/encoding/charset/CP869.kt b/escpos4k/src/commonMain/kotlin/cz/multiplatform/escpos4k/core/encoding/charset/IBM869.kt similarity index 98% rename from escpos4k/src/commonMain/kotlin/cz/multiplatform/escpos4k/core/encoding/charset/CP869.kt rename to escpos4k/src/commonMain/kotlin/cz/multiplatform/escpos4k/core/encoding/charset/IBM869.kt index 908bcaf..11fc010 100644 --- a/escpos4k/src/commonMain/kotlin/cz/multiplatform/escpos4k/core/encoding/charset/CP869.kt +++ b/escpos4k/src/commonMain/kotlin/cz/multiplatform/escpos4k/core/encoding/charset/IBM869.kt @@ -17,7 +17,7 @@ package cz.multiplatform.escpos4k.core.encoding.charset /** Page 38 [CP869: Greek] */ -public data object CP869 : Charset(38, "IBM869") { +public data object IBM869 : Charset(38, "IBM869") { override val mapping: Map = mapOf( '\uFFFD' to 0x80,