Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries over the next few weeks. Thanks for all your past and future contributions.

Archived:New line cannot be inserted with '\n' char in Alert using Java ME before S60 3rd Edition FP2 (Known Issue)

From Wiki
Jump to: navigation, search

Archived.pngArchived: This article is archived because it is not considered relevant for third-party developers creating commercial solutions today. If you think this article is still relevant, let us know by adding the template {{ReviewForRemovalFromArchive|user=~~~~|write your reason here}}.

The article is believed to be still valid for the original topic scope.

Article Metadata
Tested with
Devices(s): S60 3rd Edition, S60 3rd Edition, FP1 devices
Created: User:Technical writer 1 (10 Dec 2008)
Last edited: hamishwillee (22 Oct 2013)



A new line cannot be inserted with the '\n' character in Alerts using Java ME in older S60 Editions.


For text strings in Java ME, a new line can be inserted using the line feed character '\n'.

With S60 Editions up till S60 3rd Edition, Feature Pack 1, the new line is, however, not inserted properly.

How to reproduce

This issue can be tested with a MIDlet using the following code:

    Alert al;
al = new Alert("Hello World Alert!");
al.setString("New\nline"); // this should print text 'line' to next line

For the affected devices and S60 Editions, the string will be printed as 'New line' on the same line instead of printing the words 'New' and 'line' on separate lines.


This issue has been fixed starting from S60 3rd Edition, Feature Pack 2.

This page was last modified on 22 October 2013, at 03:59.
41 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.


Thank you!

We appreciate your feedback.