3

Our app has been working fine past few years to retrieve sql-format date time string from a lot of Android devices (with different locales/languages) to get string like 2020-06-04 11:22:33. Until recently, there is one case where the phone return datetime string like this ২০২০-০৬-০৪ ০৮:০৮:৪২ when it was supposed to be around 4th June 2020 7.00+AM. And we have no physical access to the phone.

From what I searched these are Bangladesh letters.

This is the code I used:

SimpleDateFormat dateformatter_sqldatetime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String sqldatetime = dateformatter_sqldatetime.format(new Date());

Any idea how to make it return the correct date time? Thanks

user3162662
  • 743
  • 1
  • 7
  • 20

1 Answers1

0

After researching, we found that it is called Bengali numbers.

We solved this without updating app native codes, in our server we do manual character replacement for character 1 to 9 , by referring to this thread: Converting Numbers to Local (UTF8) Bengali numbers in JasperReports & MySQL

user3162662
  • 743
  • 1
  • 7
  • 20