Troubles with Unicode string encoding in Android
I get strings in different encodings (ID3 tags).
I use e.g. new String( bytes, "UTF-16LE" )
to decode them.
On my device (Motorola Milestone) and in the emulator, this works fine.
But some users complained they get results like "T i t l e n a m e".
I've tried the Sun codepage names instead (e.g. "UnicodeBigUnmarked"), with the same result - works for me, not for the user. (Reported and tested on Samsung Galaxy, but according to Market comments, this doesn't seem to be the only device...)
Is there some alternative that works on all devices, like other codepage names or a convertion class? Or is it a bug in the runtime environment I can't work around?
Asked by: Emma473 | Posted: 24-01-2022
Answer 1
if you want to know whether they have the Charset on their device, try getting them to download "Dalvik Explorer" from the Market, and check to see that the ones you need are actually available.
(do you know their ID3 tags are valid? do you know your parser is choosing the right encoding? i wrote my own ID3 tag parser because i couldn't find one that was correct.)
Answered by: David331 | Posted: 25-02-2022Similar questions
java - troubles reading other apps config files
I have a problem. I have to access to the data folder of
other applications from my application
to read configuration's file and so on but it seems it's possible only
to read data from the sdcard and my application's data folder.
Can you suggest me how to solve this problem?
Android Pull Parsing RSS feeds troubles
I am working on a very simple RSS reader for Android as a learning experience. I decided to use the XmlPullParser for parsing the feeds as it is quite simple and has an acceptable level of efficiency (for my needs). I am getting an error while trying to parse my test feed (rss.slashdot.org/slashdot/slashdot) that I can't seem to resolve despite scouring the web for answers. The error (from eclipse) is:
S...
sql - Android SQLite trigger troubles
I'm relatively new to SQL/SQLite and I'm trying to set up a trigger in my database. Basically, there is one table containing the names and ids of people and the other table contains entries for those people. Here is the schema of my tables:
CREATE TABLE people(_id INTEGER PRIMARY KEY AUTOINCREMENT, name STRING NOT NULL,
amount_people INTEGER);
CREATE TABLE entries ...
android - Troubles getting stuff to bundle:
Hello(sorry about that) all, I'm working on a code that will allow me to enter a number in a settings screen for an app widget. That will then we saved and stored as a variable to be used in the main app for which the widget was made. I'm wondering how I can bundle the number chosen and transfer it over to the app/widget to be run.
import android.app.Activity;
import android.app.PendingIntent;
import androi...
android - Layout troubles
I am having a spot of bother with a fairly simple layout. Here it is:
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<TextView
android:id="@+id/id1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMediu...
android - Troubles starting to develop on froyo
Doing an Apprenticeship, a company told me to develop an app for Jelly-bean, but suddenly now they want to port some of my work to froyo.
I wanted to start over but i can't even start, changing a TextView text drops me a nullPointerException:
package com.videopleyer22ics;
import android.os.Bundle;
import android.app.Activity;
import android.view.Menu;
import android.widget...
audio - Troubles play sound in silent mode on Android
I am writing an android application to simply play an alarm no mater what mode the phone even if it is in silent mode.
I found this question and used the code from the answer to override the current volume state. My code looks like this:
Uri alert = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_AL...
Android Google Maps API Key v1 v2 troubles
I've been attempting to get v2 of google maps android to work.
Its not the coding thats bothering me though. I can't even get started
I've followed various articles and tutorials on how to obtain the key, I have my MD5 key, which I wont post but obviously it looks like:
xx:xx:xx:xx:xx:xx:xx:xx:xx: etc..
On Googles API console I have clicked on 'create new android key' and entered my MD5 key ...
java - Troubles with Timer - android
i have a problem with a method that i want to be called every x seconds.
In the constructor of my class I have something like that :
public class MyClass extends RelativeLayout{
public MyClass(Context context) {
// bla bla….
mTimer.scheduleAtFixedRate(new TimerTask() {
@Override
public void run() {
callMyMethodPeriodically();
}
}, 0, 20000);...
HTML troubles in standard Email app on Android tablet
I use HTML coding in email marketing.
Nowadays It is important to nice represent email offers both in standard and mobile version.
So, exist the certain tricks which help you to made your emails looks nice on mobile devices (without bugs and gaps).
For example, the most famous trouble is the tearing of content of email letter due to changing of text size by mobile device.
To ban this feature of device I use next css-trick:...
Still can't find your answer? Check out these communities...
Android Google Support | Android Community | Android Community (Facebook) | Dev.io Android