With android devices, the value is transmitted to the site through a link, the Russians are replaced with ??? and are recorded in the database too ???, how can I fix it so that Russian values can be transmitted?
Code to send data from android:
find_btn.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { login_txt_find = find_txt.getText().toString(); find_txt.setText(""); full_url = url_regAcc+"login="+login_txt_find; new Show().execute(); } }); public class Show extends AsyncTask<Void, Void, String> { @Override protected String doInBackground(Void... params) { try { URL url = new URL(full_url); Scanner in = new Scanner((InputStream) url.getContent()); result = in.nextLine(); } catch (Exception e) { result = e.toString(); } return result; } @Override protected void onPostExecute(String strJson) { super.onPostExecute(strJson); try { if(Objects.equals(result, "7")) //Не подходит { AlertDialog.Builder builder = new AlertDialog.Builder(getActivity()); builder.setMessage(R.string.java_find_txt1) .setCancelable(false) .setPositiveButton(R.string.java_find_txt2, null); AlertDialog alert = builder.create(); alert.show(); }else { JSONObject jObject = new JSONObject(result); login_prof_txt = jObject.getString("login"); name_prof_txt = jObject.getString("name"); surname_prof_txt = jObject.getString("surname"); age_prof_txt = jObject.getString("age"); city_prof_txt = jObject.getString("city"); country_prof_txt = jObject.getString("country"); String login_string = getString(R.string.java_string_login); String age_string = getString(R.string.java_string_age); info_login = login_string+login_prof_txt; info_name_surname = name_prof_txt+" "+surname_prof_txt; info_age = age_string+age_prof_txt; info_city = city_prof_txt; info_country = country_prof_txt; show_user(); } } catch (JSONException e) { e.printStackTrace(); } }
UTF8, instead ofutf-8- YuriSPb ♦utf-16stands and automatically turns intoutf-8. Whereupon, I think, the problem is not on the side of the android. - Yuriy SPb ♦UTF8_unicode_ciinstead ofgeneralfor the database to put down - YuriySPb ♦