Skip to content

Commit

Permalink
Merge pull request #62 from atjn/conversions
Browse files Browse the repository at this point in the history
Add missing locale conversions
  • Loading branch information
gfwilliams committed May 7, 2024
2 parents dc682af + 237d457 commit 7e90950
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions js/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ let DEVICEINFO = [
/* When a char is not in Espruino's iso8859-1 codepage, try and use
these conversions */
const CODEPAGE_CONVERSIONS = {
// letters
"ą":"a",
"ā":"a",
"č":"c",
Expand All @@ -81,6 +82,7 @@ const CODEPAGE_CONVERSIONS = {
"ę":"e",
"ē":"e",
"ģ":"g",
"ğ":"g",
"ī":"i",
"ķ":"k",
"ļ":"l",
Expand All @@ -91,6 +93,7 @@ const CODEPAGE_CONVERSIONS = {
"ř":"r",
"ś":"s",
"š":"s",
"ş":"s",
"ū":"u",
"ż":"z",
"ź":"z",
Expand All @@ -102,7 +105,9 @@ const CODEPAGE_CONVERSIONS = {
"Ě":"E",
"Ę":"E",
"Ē":"E",
"Ğ":"G",
"Ģ":"G",
"ı":"i",
"Ķ":"K",
"Ļ":"L",
"Ł":"L",
Expand All @@ -112,10 +117,15 @@ const CODEPAGE_CONVERSIONS = {
"Ř":"R",
"Ś":"S",
"Š":"S",
"Ş":"S",
"Ū":"U",
"Ż":"Z",
"Ź":"Z",
"Ž":"Z",

// separators
" ":" ",
" ":" ",
};

/// Convert any character that cannot be displayed by Espruino's built in fonts
Expand Down

0 comments on commit 7e90950

Please sign in to comment.