G
G
GogenZZo2017-05-03 14:44:21
PHP
GogenZZo, 2017-05-03 14:44:21

How to transfer Russian text from android to server?

Hello. In an application on android 6, I intercept an SMS message and send a post request to the server for saving. But in the database it is stored as O; O; 0;0=A: [email protected] column encoding is utf-8
And it's not in mysql, and writes to the logs in the same way, ;O;_0;0] => A: [email protected] Android-studio writes in the logs clearly, somewhere at the time of transmission or reception it distorts the text.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
G
GogenZZo, 2017-05-03
@GogenZZo

I figured it out myself. Here, few people need it

String msg = new String(message.getBytes("UTF-8"), "ISO-8859-1");

4
4iloveg, 2017-05-03
@4iloveg

Where you accept a post request print_r($_POST);
It will be clear what exactly came to the server.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question