Unmarshalling problem with special characters (Trademark, French
I'm using a DefaultHandler class to create a StringBuffer which contains a single (though very complex) element from an XML file. I am unmarshalling this StringBuffer object to a JAXBContext like this:
u.unmarshal( new StreamSource( new StringReader( sb.toString() ) )
My special characters are going way out of whack (please read (TM) as the Trademark symbol)
T-Force(TM) Ring(TM) Bonded iron construction for durability and longer life
becomes
T-Force���Ring ��� Bonded iron construction for durability and longer life
Before I put anything else into the StringBuffer I put this in:
sb.append("<?xml version=\"1.0\" encoding=\"iso-8859-15\"?>");
But I've tried:
sb.append("<?xml version=\"1.0\" encoding=\"utf-8\"?>");
and
sb.append("<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>");
with different, but wrong, results.
It's true that I'm viewing these results on a web page, so it's possible that the problem is occurring on the back end once I persist the data, but it looks like my database is set for UTF-8 (that's what I put for this new installation of Oracle 9i R2).
Is there something basic I am missing. Like, perhaps, I need to do some sort of XML entity coding?
Thank you very much for any help you can offer.
Actually I had forgotten one additional thing. I have
tried testing one thing at a time, and I have sent the
special characters to the log file with logger.debug
statements (log4j). The characters are screwed up in
the log files, which is what makes me think I need to
do some sort of entity encoding. (?)I don't think that log4j provides any way to declare the encoding it uses for your files. My guess is that it's using the default encoding for your system, which could be a problem for things like the trademark character. So log4j really gives you just another thing to test, rather than acting as a testing tool.
I was thinking of a more low-level test, where you take your trademark character, which is 2022 or some such number (check the Unicode charts) and you write it to the database and read it back. Do you get the same character back? That sort of testing.
Similar Messages
-
Problems with special characters like "u00F6" "u00E4" "u00FC"
Hi,
we currently face some major problems with special characters like "ö" "ä" "ü". First I thought it is a SP02 specific problem but it still doesn't work with SP03.
When I start an import the import manager shows correct converted value. "ö"s "ä"s "ü"s are displayed correctly. But after I've done the import I look into the Data manager and I see instead of these characters charcaters like "̈". (note: the character should show a little square box - but the forum cannot desplay it)
How can I solve this problem?
Regards
NicoHi Nico
Just try it out the following steps, hope it solves ur issue.
<b>To set one or more values back to their original values:</b>
1. In the Import Manager Source Values grid, select the values that you want to set back to their original values.
2. Right-click on one of the values and choose Set to Original Value from the context menu, or choose Values > Apply Value Conversion Filter > Set to Original Value from the main menu.
3. MDME sets each value back to its original value, which appears in black in the Source Values grid.
<b>NOTE : You can use the Set to Original Value filter only at the value-level and not at the field level.</b>
thanks
Alexander -
Problems with special characters in InputStream or XPath
Hello everyone,
I am having problems with special characters such as ", ', - and so on, everything becomes ? (questionmark). (Not with special nordic characthers (å,æ,ø) though.)
The encoding of the XML is UTF-8, and the server that holds the webservice is setting encoding to UTF-8 also, so no conflict there.
What I have done is something like this:
{code}
String url = "http://www.formula1.com/rss/news/latest.rss"; // This is not the feed I use, it is a custom XML document
InputSource is = new InputSource(url);
DocumentBuilderFactory fct = DocumentBuilderFactory.newInstance();
DocumentBuilder builder = fct.newDocumentBuilder();
Document doc = builder.parse(is);
Element rootElement = doc.getDocumentElement();
XPathFactory factory = XPathFactory.newInstance();
XPath xPath = factory.newXPath();
out.print(xPath.evaluate("/rss/channel/title", rootElement)); // The xml is not a RSS feed, this is just an example.
{code}
Please let me know what I am doing wrong, or give me a hint of how to solve this in another way.
Best regards,
G.Hansen
Edited by: G.Hansen on Mar 24, 2009 2:39 AMHello, thanks for you reply. I had to rewrite your code a little, and I think that your code would not really compile, if you tried yourself :-)
I ended up with something like this:
our environment is running in 1.4 mode, so I could not use the for-each loop :-(
public String printEntities(String s) {
char[] sArray = s.toCharArray();
StringBuffer sb = new StringBuffer();
for (int i = 0; i < sArray.length; i++) {
if (sArray[i] > 256)
sb.append("&#x" + Integer.toHexString(sArray) + ";");
} else
sb.append(sArray[i]);
return sb.toString(); -
Problems with special characters in JSP app
Hello!
I am working for a JSP application which uses special characters.
The database used is a Novell MySQL version, it is fine.
I use Tomcat, Apache.
I do not think that the versions are important.
ON NT:
The application works fine with special characters.
Obs: I tried only with Tomcat; I didn't use Apache.
ON NOVELL:
If I try to insert some special characters,
they arrive just fine into the database.
The problem is when I want to display them.
I tried with jsp directive to set the charset,
or with HTML meta tag - no result al all.
Everytime I use the same work station, and the same browser to do the tests.
Please help with any ideas.
Another question, maybe relayed:
Can I set Tomcat so that when it creates the servlets it uses a custom charset I can indicate?
THANK YOU!The characters I want to use are french characters, e-acute, etc.
I take the data with request.getParameter, POST method, etc. -
Problems with special characters with XML/PDF printing
Hi,
Our setup:
Apex Listener 2.0.5
Oracle DB 11G
Weblogic
Apex 4.2.2
Various recent major browsers
We used this blog post so we could do some PDF printing with APEX Listener:
http://marcsewtz.blogspot.be/2013/04/pdf-printing-with-oracle-application.html
The problem is special characters. For example the "&" sign comes out as "%26amp;" when we export an XML.
Could anyone provide some insights of what we can do to fix this?
Regards,
JoniThis is a known bug.
https://support.oracle.com/epmos/faces/BugDisplay?_afrLoop=957905848396285&id=18282188&_afrWindowMode=0&_adf.ctrl-state=168vq5zhn3_233
The bug 18282188 has been fixed in Apex 4.2.5 version.
Upgrade the Apex version to 4.2.5 when it is available. -
Problem with special characteres
Hi. I have a problem with java. I�m making an application that works with special characters and displays correctly on my local machine, as I use escape characters such as ì for �. The problem is when I deploy the application on a unix machine. All of the special characters (�, �, �, etc) appear like a �?� (question mark). Any tips, please?
Thanks in advanceAndy2008 wrote:
Hi. I have a problem with java. I’m making an application that works with special characters and displays correctly on my local machine, as I use escape characters such as ì for �. The problem is when I deploy the application on a unix machine. All of the special characters (‘, �, �, etc) appear like a “?” (question mark). Any tips, please?First step: read [this excellent introduction into Unicode|http://www.joelonsoftware.com/articles/Unicode.html], it will give you the basics you need to solve this problem.
How do you input and output those characters? Simply print them to the console? Or write them to a HTML file (since you mention &<something>; notation)?
"?" is normally the result when you convert a String (which is always in UTF-16 encoding in Java) to an encoding that can't represent your characters (ASCII for example). -
Problem with specials characters like '€' or 'œ'
Hello,
I'm having troubles with specials characters such as '€' or 'œ'.
I use an application connected to a 9.2.0.7.0 database on a w2003 server.
Characterset of the database is FRENCH_FRANCE.WE8MSWIN1252.
In my workstation the value of [HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\HOME0\NLS_LANG] is also FRENCH_FRANCE.WE8MSWIN1252.
But when I type such specials characters through the application, they are replaced by '¿' in the database. The datatype of this column is varchar2.
Can anyone help me ?
thanks
Antoine
Edited by: Antoine.M on Aug 19, 2009 12:45 PMIs your application a java application ? if so, pl see MOS Doc 365874.1 (Euro Symbol/Trademark Symbol is Garbled When JDBC Thin Driver Retrieves Data from a Database with Characterset WE8MSWIN1252)
HTH
Srini -
SMARTFORM problems with special characters
Hi everybody,
only to know if somebody knows how to fix a problem printing special characters in a smartform, instead of some characters the smartform display (Print preview) and prints interrogative symbols <b>"?"</b>.
If someone knows about this problem, it will be helpfully for me,
thanks and have a good dayHI
To display Special characters in Smartforms ...
goto text editor of the perticular text node.
in the text editor, Click INSERT - Characters - Displayable Characters.
a new window will open showing all characters...if ur required character is not
present, click on non-dispalyble character button , it displays all the characters
and their respective numbers...select ur required character .
Check it, if it is helpfull reward points..
Thanks
REGARDS
DINESH -
Problems with Special Characters on Exchange Email
Hello:
People I have a issue with our Corporate Email on my Iphone. We use Exchange 2003 and we have users with special characters on his emails address.
I receive fine the email, just appear a errors on the display name. The issue is when I try to reply thie email. A error message popup said:
Invalid Address
"email with special characters" does not appear to be a valid email address. Do you want to send it anyway?
If I press Yes, Iphone try to send the message But I receive another error message:
Cannot send Mail
An error ocurred while delivering this message.
Any Help or Idea?
Here My Email Configuration
Email = Email
Server = Server IP
Domain = Work Domain Name
Username = my user id
Password = my password
Description = Work
Use SSL = ON
S/Mime = OffWhen I Said "we have users with special characters on his emails address" its mean users with ñ,ó, ú, Ñ on his emails address.
When I said "just appear a errors on the display name" I mean characters like Âñ¡
Thanks -
Problems with Special Characters in DBs...
We have just moved a set of tables from one db on one server to another db on another server. the only problem is that some special characters held within data on the tables aren't showing up properly on the new db. characters such as a circle with an 'R' in (as in registered trademark), or vowels with umlauts over them.
THe db is used by a website and it is the development version of the website which uses the new db that is not displaying the characters properly. The characters are also displayed incorrectly within sql plus 3.3.
If anyone could point out why the new db is not storing the characters correctly i would unmeasurably grateful.
Thanking you in advance
Ewan Gibb.Hello, thanks for you reply. I had to rewrite your code a little, and I think that your code would not really compile, if you tried yourself :-)
I ended up with something like this:
our environment is running in 1.4 mode, so I could not use the for-each loop :-(
public String printEntities(String s) {
char[] sArray = s.toCharArray();
StringBuffer sb = new StringBuffer();
for (int i = 0; i < sArray.length; i++) {
if (sArray[i] > 256)
sb.append("&#x" + Integer.toHexString(sArray) + ";");
} else
sb.append(sArray[i]);
return sb.toString(); -
File XML Content Conversion: Problem with special characters
Hello,
in a file sender cc content conversion is used to transform a flat structure to XML. What we experiencecd is that the message mapping failed due to a character that was not allowed in XML:
I was assuming that the file content conversion just creates XML messages with allowed characters. Is there any way to configure content conversion to remove control characters which are not allowed in XML? Unfortunately the sender system cannot be modified.
Thank you.Hi Florian,
Please use this UDF to remove special characters which prevent XML messages to form properly.
public static String removeSpecialChar(String s)
try
s=s.replaceAll("&","& amp ;");
s=s.replaceAll("<" , " & lt ;");
s=s.replaceAll(">", "& gt ;");
s=s.replaceAll("'", "& apos ;");
s=s.replaceAll("\"", "& quot ;");
catch(Exception e)
e.printStackTrace();
return s;
Please remove spaces between characters within double quotes. I have added them because otherwise you can't see this code properly. Please check this below link , please replace the characters with proper values as the display is causing a problem here
http://support.microsoft.com/kb/316063
regards
Anupam
Edited by: anupamsap on Jul 7, 2011 4:22 PM
Edited by: anupamsap on Jul 7, 2011 4:23 PM -
Dtterm and xterm - problems with special characters
I run SGD 4.2 on a Solaris 8 box with 50 users globally. This installation replaces a 3.42 installation. Clients are all Solaris 8.
Currently my most nagging problem is that I have "special characters" (at least on a german keyboard layout). @, �, `, ' are not working in xterm or dtterm, while they did on 3.42.
As we have users connecting from all over the world, I have no idea how to fix this, so every user has "his/her own" keyboard setup.
So far I tried with and without "Lock keymap" in Object Manager | Attributes | Advanced
and "Use LANG variable" vs. "Use client's input locale" in Array Manager | X Protocol Engine | Keyboard Map.
I'm quite new new to SDG and look for an Amin training currently, but this is too urgent to wait for this. Anyone an idea, please?Hi,
Did you get an answer after 3 years?? :-)
Whe do have the same problem.
SUSE 10.1 sp1
SSGD portal.
Only when we connect thru de portal whe have this problem.
When we connect straight to a terminal server and we open Winword than it ok, but when we open thru the terminal server de portal and logon to it, than then keyboard setting is changed.
Any help??
Best regards Rob de Bruin -
Vibe 3.2 problems with special characters?
I'm not sure where the issue lies here, the client or Vibe, so I'll throw
this out there to see if anyone has run into this problem. I have a user
with a + sign in their password. If he tries to log in from either his
Android phone or his Android tablet, he gets a bad password error. Using a
different browser on the tablet, he was able to get logged in. Using my
Android phone, he was also able to get logged in.
Are there any known issues with Vibe not supporting certain browsers for
special characters in passwords? I don't think he had the problem with Vibe
3.1.
thanks,
Todd Bowman
Senior Network Analyst
University of Minnesota Physicians
612-884-0744
[email protected]Yes, you're right. Same issue here with a '' character. Found this:
'6.2 Character Restrictions in Usernames and Passwords
Do not use extended characters or double-byte characters in Novell Vibe usernames and passwords.
This includes usernames and passwords that are synchronized from an LDAP directory into Vibe.
This limitation is caused by the open source Spring Security (http://static.springframework.org/
spring-security/site) that Vibe uses for authentication, in combination with the various authentication
methodsboth basic authentication (http://en.wikipedia.org/wiki/Basic_a...authentication) and
form-based authentication (http://en.wikipedia.org/wiki/Form_ba...tication)used by
single sign-on products such as Novell Authentication Manager, by Web services, and by WebDAV.
Only ASCII characters are properly interpreted in all combinations.'
source: https://www.novell.com/documentation...dme_novell.pdf
Extremely frustrating for anyone using strong passwords... -
Hi friends, Problems with Special Characters in Table download to Excel.
Hi friends,
I am using Binary Cache method to download to excel. The problem is that there are certain fields in the back end R/3 that has special characters in it eg : & * £ # etc.
As a result, the download is not working for these rows. Please can any of you tell me how to get rid of this. As an example let's say I wan to replace the "&" with "and".
Please help.
Thank You.
Avikhi,
Hope you find tgis of some help !!
public void ReplaceMethod( )
//@@begin ReplaceMethod()
// get the string value of the cell (for you from the table cell, for eg, Pinki & Rakesh)
test = wdContext.currentTestStringConversionElement().getInput();
// calculate the total length of the String
n=test.length ();
if(n!=0)
for(i=1;i<=n;i++)
// catching each character from the String
c = test.charAt (i-1);
// checking if any character within the String (eg, Pinki & Rakesh) is &
if (c=='&')
wdContext.currentTestStringConversionElement().setOutput(Character.toString(c));
no=i;
break;
String val = Integer.toString(no);
//wdContext.currentTestStringConversionElement().setNo(val);
// breaking the String and adding and in place of &
sub1= test.substring(0,i-1);
sub2= " and ";
sub3= test.substring(i,n);
//Concatenating the String
test1 = sub1sub2sub3;
//Printing the String
wdContext.currentTestStringConversionElement().setOutput(test1); -
Problems with special characters when exporting to LDAP
Hi,
Im using standard report RPLDAP_EXTRACT to export data to LDAP. The problem is that the special characters (in this case polish letters) do not save correctly (we get for instance '?' instead of normal letter)
I tried switching the configuration of the RFC destination (used: 'found communication Code Page option') but I get a message: "Your selection is restricted" and cannot make any changes.
Can anyone please help in this matter?
Regards,
Hubert1) Your database should be able to handle and properly store all the supported charactersets needed. With UTF you are in the clear regarding storing all that kind off idfferent characters
See http://www.oracle.com/technology/tech/globalization/htdocs/nls_lang%20faq.htm
2) The recieving party (the cleint software) hopefully has a character set that supports all the characters that are offered by the database and can encode them. If not then you get toe upside down question markt or dark squares or something alike. If the client software is a browser, for instance windows internet explorer, then most encoding settings are buildin and you only have to switch. Sometimes you will have to add extra language support on Windows Internet Explorer. This behaviour is also the same on thick clients. Oracle by default sets these parameters in the registry, but on windows the can be overrulled on several levels like on system level, user level (start --> settings -- control panel --> system --> advanced tab --> environment settings) and or during execution via a app. configuration file or an export of the system variable on the command prompt... A unified business approach for how to handle this is needed otherwise you will have too look for these kinds off issues always all over the place (on windows and/or linux etc).
Have a look at Mark's example of how things work regarding UTF and the like on the FAQ URL on this forum and the URL as show above. If completely lost, you will have to read up on it in the Oracel globalization / NLS manuals and see what is appropriate / can be done in your environment.
Maybe you are looking for
-
How to find the code in standard transaction from where event is trigered
I have a configuration in SWEC, to trigger an event, when a PR is change For the Transaction ME52 (Change Purchase requisition), I want to go to the portion of the code, from where the function module for triggering the event is executed. I have lear
-
Hi Guys I have Cursor now i want to check weather its return any row before i fetch it and do some processing.what i have done is i have open cursor and then check for %rowcount > 0 but it doesnt work. Please guide me Thanks
-
HT204161 email associated with two different Apple IDs keeps me from logging in
It seems I have two different apple id accounts both associated with the same recovery email address. As I enter to "Manage My Apple ID" it tells me I need to verify my email address. Specifically, it says "A verification email was previously sent to
-
How to download iphoto and other software for other macs from the liscensed version from a new mac
I purchased a macbook pro in Dec 2011 and was told I could download software from app store (ilife, OSX, etc) for up to two other macs based on the software liscense agreement. Can anybody tell me where to find instructions on how to do this? Thanks.
-
Close() into function using ScriptUI.
Guys, I created an interface with ScriptUI that has a iconbutton within a group, which in turn is inside another group. I also created a listener to see which pressed on the keyboard, which performs a function where there is a condition that should c