Hi All,
I am trying to use the same code as on
this example, and it works fine for English barcode.
When I try to use it with PDF417 format in Arabic, it returns the char below:
Ver_7.0000dEbWKSMb02qLFåÝħ8L7À¼w÷n𺯣ÿQGA
d«Ú®"¼ñHò´.ëÑè?>ãÜ)2eºÈQK¤ÕÁ]¯Ñ¶CFQy¿¦¯Zé¿[Á7gVñ_÷(ÙvJ]v¸lã¬&ôQÖ}¶²îp+âèÔÐuºãÖÎη Ü1ñ1%g"_642q¡h��¥· ÄäÓÈbÌOö×ÌαêBezSàá6¡û'Nâ2Ú½`xQ×XæÒ{«%³~èÆIá&hÞ J?Üü¥èÀMgG]r Oëô¨L`omã
So I guessed it is because it needs to be UTF8, so I have tried to use the
ICUB4A to see if it is UTF8 and it indeed returns UTF-8.
So I tried to use the
decodeURL but returned an error:
java.lang.IllegalArgumentException: URLDecoder: Illegal hex characters in escape (%) pattern : %g"
So I am not entirely sure how to read PDF417 barcode that contains Arabic characters if someone can help or guide me to the correct direction.
Private Sub FoundBarcode (msg As String)
lblResult.Text = msg
toast.Show($"Found [Color=Blue][b][plain]${msg}[/plain][/b][/Color]"$)
Log(msg)
File.WriteString(File.DirDefaultExternal, "String.txt", _
msg)
Dim fileLocation As String
fileLocation = File.Combine(File.DirDefaultExternal,"String.txt")
Dim detectionResult As String
detectionResult =icu.readFileAsStringGuessEncoding(fileLocation)
Log(detectionResult)
Dim su As StringUtils
Log(su.DecodeUrl(msg,"UTF8"))
End Sub