Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Adobe AIR Development

Reply
Developer
Posts: 889
Registered: ‎08-31-2009
My Device: 9530, 9630, 9800, 8530, 9900, 9810, 9930, PlayBook, Dev Alpha
My Carrier: Verizon
Accepted Solution

Accent marks not showing up in apps

Whenever I use a character that makes use of an accent mark (such as á), the app is unable to render the character and instead just shows a box. I am using the default font, and font style.

 

Does any one know a work around for this


Read my thoughts on BlackBerry Development at news.ebscer.com
Retired
Posts: 427
Registered: ‎02-22-2012
My Device: BlackBerry Z10, BlackBerry Dev Alpha C, BlackBerry PlayBook
My Carrier: Bell

Re: Accent marks not showing up in apps

[ Edited ]

Hi,

 

I tried testing the issue you are having using labels and inputs but I was unable to replicate it. The characters show up fine for me when debugging on my PlayBook. How are you adding your text?

 

Here is the code that I was using.

 

 

package
{
	import flash.display.Sprite;
	import flash.display.StageAlign;
	import flash.display.StageScaleMode;
	import flash.text.TextFormat;
	
	import qnx.fuse.ui.text.Label;
	import qnx.fuse.ui.text.TextFormat;
	import qnx.fuse.ui.text.TextInput;
	
	[SWF(height="600", width="1024", 
    frameRate="30", backgroundColor="#FFFFFF")]
	
	public class LargerInputTest extends Sprite
	{
		//Create textinput, label and format
		private var myText:TextInput = new TextInput();
		private var myTextFormatInput:qnx.fuse.ui.text.TextFormat = new qnx.fuse.ui.text.TextFormat();
		private var myTextFormatLabel:flash.text.TextFormat = new flash.text.TextFormat();
		private var firstLabel:Label = new Label();
		
		public function LargerInputTest()
		{
			initializeUI();
		}
		
		private function initializeUI():void
		{
			//Create and position text input
			myText.height = 100;
			myText.width = 500;
			myText.x = stage.stageWidth*.5 - myText.width*.5;
			myText.y = stage.stageHeight*.5 - myText.height*.5 -100;
			myText.text = "£ § â é ñ ú";
			
			/*//Style
			myTextFormatInput.font = "Arial";
			myTextFormatInput.size = 36;
			
			//Assign style
			myText.format = myTextFormatInput;
			*/
			//Add to stage
			addChild(myText);
			
			//Create and position label
			firstLabel.text = "First lábel";
			firstLabel.height = 100;
			firstLabel.width = 500;
			firstLabel.x = stage.stageWidth*.5 - firstLabel.width*.5;
			firstLabel.y = stage.stageHeight*.5 - firstLabel.height*.5 - 150;
			
			//style label
			myTextFormatLabel.font = "Arial";
			myTextFormatLabel.size = 36;
			
			//assign style
			firstLabel.format = myTextFormatLabel;
			
			//add label
			addChild(firstLabel);
		}
	}
}

 Regards,

Dustin

Follow me on Twitter: @dustinmalik
-----------------------------------------------------------------------------------------------------
Keep up to date on BlackBerry development: http://devblog.blackberry.com/
Developer
Posts: 889
Registered: ‎08-31-2009
My Device: 9530, 9630, 9800, 8530, 9900, 9810, 9930, PlayBook, Dev Alpha
My Carrier: Verizon

Re: Accent marks not showing up in apps

I have compiled the code you posted, and am still not seeing the characters.

 

I did have to change "qnx.fuse.ui." to "qnx.ui." in order to get the code to compile. Do you think that it could be related to that?


Read my thoughts on BlackBerry Development at news.ebscer.com
Retired
Posts: 427
Registered: ‎02-22-2012
My Device: BlackBerry Z10, BlackBerry Dev Alpha C, BlackBerry PlayBook
My Carrier: Bell

Re: Accent marks not showing up in apps

Maybe... Are you using the 2.0 SDK?

Follow me on Twitter: @dustinmalik
-----------------------------------------------------------------------------------------------------
Keep up to date on BlackBerry development: http://devblog.blackberry.com/
Developer
Posts: 889
Registered: ‎08-31-2009
My Device: 9530, 9630, 9800, 8530, 9900, 9810, 9930, PlayBook, Dev Alpha
My Carrier: Verizon

Re: Accent marks not showing up in apps

I think I may still be using the 1.6 SDK

 

I will install the new one, and see if it helps.


Read my thoughts on BlackBerry Development at news.ebscer.com
Developer
Posts: 889
Registered: ‎08-31-2009
My Device: 9530, 9630, 9800, 8530, 9900, 9810, 9930, PlayBook, Dev Alpha
My Carrier: Verizon

Re: Accent marks not showing up in apps

I have upgraded to the 2.0 SDK, which allows the app to build with the "qnx.fuse.ui." components. Still, I am seeing an empty box where the special character should be

 

Capture.PNG


Read my thoughts on BlackBerry Development at news.ebscer.com
Highlighted
Retired
Posts: 427
Registered: ‎02-22-2012
My Device: BlackBerry Z10, BlackBerry Dev Alpha C, BlackBerry PlayBook
My Carrier: Bell

Re: Accent marks not showing up in apps

Hi,

 

Hmmm... I've tested in the simulator and on a PlayBook and in both instances the characters are showing up for me. Have you tried both the simulator and a PlayBook? If so what versions are you running? Are special characters showing up when you hold down characters on the keyboard like "a"?

 

special-character.jpg

 

 

Follow me on Twitter: @dustinmalik
-----------------------------------------------------------------------------------------------------
Keep up to date on BlackBerry development: http://devblog.blackberry.com/
Developer
Posts: 889
Registered: ‎08-31-2009
My Device: 9530, 9630, 9800, 8530, 9900, 9810, 9930, PlayBook, Dev Alpha
My Carrier: Verizon

Re: Accent marks not showing up in apps

I have tested in simulators for 1.6 and 2.0 and on a real device in 2.0

 

Oddly when I hold down on the keyboard I can type in the special characters and they work fine. (but the ones in the source code don't.


Read my thoughts on BlackBerry Development at news.ebscer.com
Developer
Posts: 889
Registered: ‎08-31-2009
My Device: 9530, 9630, 9800, 8530, 9900, 9810, 9930, PlayBook, Dev Alpha
My Carrier: Verizon

Re: Accent marks not showing up in apps

I think that I may have figured this out. It looks to be an issue with the file encoding. I am still playing around with it, but I have gotten a few characters to work out.


Read my thoughts on BlackBerry Development at news.ebscer.com
Retired
Posts: 427
Registered: ‎02-22-2012
My Device: BlackBerry Z10, BlackBerry Dev Alpha C, BlackBerry PlayBook
My Carrier: Bell

Re: Accent marks not showing up in apps

If you figure it out would mind posting back what you did?

 

Thanks,
Dustin 

Follow me on Twitter: @dustinmalik
-----------------------------------------------------------------------------------------------------
Keep up to date on BlackBerry development: http://devblog.blackberry.com/