Discussion Forums  >  Self Hosted Control Panels

Replies: 12    Views: 103

LeonG
Apple Fan
Profile
Posts: 694
Reg: Nov 08, 2011
Hamburg
17,740
11/21/14 05:29 PM (9 years ago)

encoding, android/eclipse not working

Hey there, my special german characters like ä,ü,ö etc.. show up as question marks on my app menu. As soon as I update the app, the chars show up as they should. I can change the encoding on the BT-config.txt as I like but I do not see any changes unless I press update... I don't understand what the app gets from the online config what is not in the offline (as they are the same), so is there something else I should look into? No matter if I change the BT-config.txt in the editor and overwrite or directly in Eclipse. It is pretty annoying as most customers just see the missing chars what makes the app look unprofessional! Cant ask them all to please update after first install so that the display is right... Any help on this would be much appreciated!
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
11/21/14 05:34 PM (9 years ago)
Hi Leon, I'm just taking a guess here, but if the app is configured in online mode, then it loads the file in cache first (which might have the old encoding in it), then checks for an update, does the refresh, and all is well. So, even though the offline config (which I assume you to mean the one you compile with that's in the assets folder) and the one on the BT server match, it may not match what's in cache. As an experiment, you should delete your app from your device, after clearing the data and cache for it. Then recompile your app, ensuring your online and offline config files are truly exactly the same, and install the app on your device. There will be no old cache file in this instance (at least in theory), and it should grab what you need the first time. Let us know how it goes. Mark
 
LeonG
Apple Fan
Profile
Posts: 694
Reg: Nov 08, 2011
Hamburg
17,740
like
11/21/14 05:42 PM (9 years ago)
Hey Mark, yeah thought of all that as well but no change unfortunately. Cant imagine what, but somehow it must be something else then the config file...
 
LeonG
Apple Fan
Profile
Posts: 694
Reg: Nov 08, 2011
Hamburg
17,740
like
11/21/14 05:46 PM (9 years ago)
actually, could it have something to do with the menu? using menu advanced here. Looking into it
 
LeonG
Apple Fan
Profile
Posts: 694
Reg: Nov 08, 2011
Hamburg
17,740
like
11/21/14 06:05 PM (9 years ago)
well that didn't work either. changed all XML files from UTF-8 to ISO-8859-1 but still the same problem.
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
11/21/14 06:24 PM (9 years ago)
I'm kinda stumped. I'll try and do some research on localization and Android later this evening. Trying to help somebody with Scringo implementation at the moment, and beating my head against the wall! Mark
 
LeonG
Apple Fan
Profile
Posts: 694
Reg: Nov 08, 2011
Hamburg
17,740
like
11/21/14 06:26 PM (9 years ago)
Thx Mark, appreciate it very much!
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
11/21/14 09:50 PM (9 years ago)
Alrighty, I found some stuff that might help. Not certain, but it's worth a shot. This is all about localization (I think). Android needs to know what language that it should display text in. It does this via the res > values > strings.xml file. Buzztouch ships with one, which is default US English. If you want to localize your app for a different language, German, for example, you would want to create the following folder: res > values-de In that folder, you'd want to create a strings.xml file that is localized with stuff that you want. You don't need to translate all the strings if you don't want...just the ones that make sense. So, you'd have something that looks like this: res > values-de > strings.xml So, you're probably wondering how this answers your question. Well, I'm not 100% sure it does, but I do know this. If device is set to run using a certain language, German, for instance, it looks for a res > values-de > strings.xml file. If it doesn't find one, then it defaults to the standard one, which is English. I'm hypothesizing here, but I think that perhaps since there isn't a German strings.xml file, it's just showing everything in English. If you have one, perhaps everything will be shown in German as expected? Just a guess based on what I've read. There's an interesting post here that might help: http://www.icanlocalize.com/site/tutorials/android-application-localization-tutorial/ I really hope this works for you! If it doesn't, post back, and we'll figure it out! Mark
 
mysps
Code is Art
Profile
Posts: 2082
Reg: May 14, 2011
Palma
33,320
like
11/22/14 02:00 AM (9 years ago)
yeah its the config file. you probably shouldnt allow it to update because it wont save properly unless saved locally by you. take a look at this post. my apps are offline so the characters stay in tact. https://www.buzztouch.com/forum/thread.php?fid=42BB2FE335B7E57567F9BA3&tid=42BB2FE335B7E57567F9BA3
 
LeonG
Apple Fan
Profile
Posts: 694
Reg: Nov 08, 2011
Hamburg
17,740
like
11/22/14 03:30 AM (9 years ago)
Always had and have my German Strings file in place. I still think it is more the menu plugin then anything else, but can't figure it out.
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
11/22/14 10:14 AM (9 years ago)
Well, Leon, unfortunately I'm stumped. I'd suggest reaching out to Susan Metoxen, the developer of that plugin, and see if she can help. If it isolated to that particular plugin, then the problem could indeed be there. Mark
 
LeonG
Apple Fan
Profile
Posts: 694
Reg: Nov 08, 2011
Hamburg
17,740
like
03/02/15 08:45 AM (9 years ago)
solved. In Eclipse, open the BT_config.txt directly in your favorite editor (KomodoEdit for me) outside Eclipse and save it as UTF-8. Clean and build.
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
03/02/15 08:46 AM (9 years ago)
Excellent! Good information to have. Mark
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.