Charset from UTF8 -- IBM864 or cp864
I have an applet which does the printing. When applet is trying to print , except for
arabic alpha characters , everything is getting printed. Junk is getting printed in
for alpha characters. Arabic numerals are getting printed correctly.
I'm using UTF-8 in the jsp page where we are calling the applet. Printer is using
IBM CP864 encoding. In the OutputStream , I had specified the required supported
encoding i.e. cp864.
Can anyone help me out in resolving this issue ?
<object
id="ReceiptPrinterApplet"
classid="clsid:CAFEEFAC-0015-0000-0007-ABCDEFFEDCBB"
width="0" height="0" >
<param name="code" value="ReceiptPrinterApplet.class">
<param name="printermode" value="Broad">
<param name="Receipt No1" value="127733">
<param name="Receipt No in Arabic1" value="١٢٧٧٣٣">
<param name="Date1" value="23-09-2007 10:31:19">
<param name="Date in Arabic1" value="٢٣-٠٩-٢٠٠٧ ١٠:٣١:١٩">
<param name="Transaction Code1" value="PAYTRANCODE95196864">
<param name="Account Number1" value="0504871150">
<param name="Account Number Arabic1" value="٠٥٠٤٨٧١١٥٠">
<param name="Party Name1" value="KUANJIKOMBIL VARGHESE ALEXANDER (720216)- PO Box No:245">
<param name="Party Name Arabic1" value="����� ������ ������ �������">
<param name="Payment Amount1" value="1931.4">
<param name="Payment Amount in Arabic1" value="١٩٣١.٤">
</object>
This is the java code which is used to
fos = new FileOutputStream("LPT1");
PrintStream pw = new PrintStream(fos,true,"Cp864");
pw.print()..
pw.print()..
Issue : arabic alpha character not getting printed
In my application , we are treating arabic numerals and arabic alpha characters differently. Arabic alpha are stored as UTF-8 in the database
// while saving
this.arabicDesc=new String(paymentTransactionTypeDetailVO.getArabicDesc().getBytes("ISO8859_1"),"UTF8") ;
// while retrieving from database
paymentTransactionTypeDetailVO.setArabicDesc(new String (arabicDesc.getBytes("UTF8"),"ISO8859_1"));In case of arabic numerals , they are converted on the fly to arabic. Code used is
public String convertDigitToArabic(long id)
nf.setMinimumFractionDigits(0);
if (nf instanceof DecimalFormat) {
DecimalFormat df = (DecimalFormat)nf;
df.setDecimalSeparatorAlwaysShown(false);
DecimalFormatSymbols dfs = df.getDecimalFormatSymbols();
// set the beginning of the range to Arabic digits
dfs.setZeroDigit('\u0660');
df.setDecimalFormatSymbols(dfs);
return new String(nf.format(id).getBytes("UTF8"),"ISO8859_1")
}Through the above mentioned methods we are converting the arabic.
In all the jsp pages , we are using
<META HTTP-EQUIV="Content-type" CONTENT="text/html; charset=UTF-8">Finally jsp page will get created like this
<object
id="ReceiptPrinterApplet"
classid="clsid:CAFEEFAC-0015-0000-0007-ABCDEFFEDCBB"
width="0" height="0" >
<param name="code" value="ReceiptPrinterApplet.class">
<param name="printermode" value="Broad">
<param name="Receipt No1" value="127733">
<param name="Receipt No in Arabic1" value="١٢٧٧٣٣">
<param name="Date1" value="23-09-2007 10:31:19">
<param name="Date in Arabic1" value="٢٣-٠٩-٢٠٠٧ ١٠:٣١:١٩">
<param name="Payment Type" value=""> <!-- there is not corresponding field -->
<param name="Transaction Code1" value="PAYTRANCODE95196864">
<param name="Payment Type1" value="">
<param name="Party Id:1" value="">
<param name="/Request No1" value="">
<param name="Account Number1" value="0504871150">
<param name="Account Number Arabic1" value="٠٥٠٤٨٧١١٥٠">
<param name="Party Name1" value="KUANJIKOMBIL VARGHESE ALEXANDER (720216)- PO Box No:245">
<param name="Party Name Arabic1" value="����� ������ ������ �������">
<param name="Cashier Name1" value="cbcmdev">
<param name="Payment Amount1" value="1931.4">
<param name="Payment Amount in Arabic1" value="١٩٣١.٤">
<param name="Currency1" value="AED">
<param name="PAYMENT_LEVEL1" value="">
<param name="Bank code1" value="">
<param name="Cheque Number1" value="">
<param name="Cheque Date1" value="">
</object>In the applet , we are using code like
//fos = new FileOutputStream("c://BroadReceipt.txt");
fos = new FileOutputStream("LPT1");
PrintStream pw = new PrintStream(fos, true, "cp864");Arabic Numerals are getting printed but not alph character ( for eg.
<param name="Party Name Arabic1" value="����� ������ ������ �������">
Can you identify where could be the problem
Why there is a difference in alpha and numeric ? Is database storing the value in a different format ?
We are also displaying these contents in the preview ( html ) , there all the values ( arabic alpha as well as numerals) are getting displayed correctly ..
When i changed my applet code from cp864 to UTF8 and used the same code to write into a flat file , all the values are getting displayed correctly. So definetly there is an issue in playing with encoding. How to resolve this issue ?
code of applet
public void printBroadReceipt() {
try {
FileOutputStream fos = null;
int noOfReceipts = receiptData.size() / noOfDataPerPage ;
System.out.println("No of receipts "+noOfReceipts);
fos = new FileOutputStream("LPT1");
PrintStream pw = new PrintStream(fos,true,"Cp864");
for ( int pageIndex = 0 ; pageIndex < noOfReceipts ; pageIndex++ ) {
System.out.println("Inside loop "+pageIndex);
pw.print("\u001B\u0043\u0012"); // set page length to 16 lines
pw.print("\u001B\u0000"); // set line feed to 1/8 inch
pw.print("\u0002\u0006");
// skipping header space
pw.print(CONTROL_LF+CONTROL_LF+CONTROL_LF);
// Receipt Number in Eng & Arabic
pw.print(generateLine(18,getString(receiptData.get(0 + (pageIndex*noOfDataPerPage))),42,getString(receiptData.get(1 + (pageIndex*noOfDataPerPage))))+CONTROL_LF);
pw.print(CONTROL_LF);
// Date in Eng & Arabic
pw.print(generateLine(10,getString(receiptData.get(2 + (pageIndex*noOfDataPerPage))),44,getString(receiptData.get(3 + (pageIndex*noOfDataPerPage))))+CONTROL_LF);
// Transaction Code
pw.print(generateLine(25,getString(receiptData.get(5 + (pageIndex*noOfDataPerPage))),0,null)+CONTROL_LF);
// since the pre-printed receipt dont have provision to print the label,
// we are printing the label
String partyId = getString(receiptData.get(7 + (pageIndex*noOfDataPerPage)));
// cancelled
if ( (partyId == null) || (partyId.length() == 0)) {
pw.print(generateLine(30,getString(receiptData.get(6 + (pageIndex*noOfDataPerPage))),0,null)+CONTROL_LF);
else {
String temp = generateLine(7,"Party No. ",3,partyId);
pw.print(generateLine(1,temp,30,getString(receiptData.get(6 + (pageIndex*noOfDataPerPage))))+ CONTROL_LF);
String requestNo = getString(receiptData.get(8 + (pageIndex*noOfDataPerPage)));
if ( (requestNo == null) || (requestNo.length() == 0))
pw.print(generateLine(18,getString(receiptData.get(9 + (pageIndex*noOfDataPerPage))),42,getString(receiptData.get(10 + (pageIndex*noOfDataPerPage))))+CONTROL_LF);
else {
pw.print(generateLine(7,"Request No. ",1,getString(receiptData.get(9 + (pageIndex*noOfDataPerPage))))+CONTROL_LF); // 9 Request Number
//pw.print(CONTROL_LF);
pw.print(CONTROL_LF);
pw.print(CONTROL_LF);
pw.print(generateLine(13,trim(getString(receiptData.get(11 + (pageIndex*noOfDataPerPage))),50),0,null)+CONTROL_LF);
//pw.print(generateLine(13,trim(getString(receiptData.get(11 + (pageIndex*noOfDataPerPage))),50,100),0,null)+CONTROL_LF);
pw.print(generateLine(13,trim(getString(receiptData.get(12 + (pageIndex*noOfDataPerPage))),50),0,null)+CONTROL_LF);
pw.print(CONTROL_LF);
pw.print(generateLine(50,getString(receiptData.get(15 + (pageIndex*noOfDataPerPage))),0,null)+CONTROL_LF);
//pw.print(generateLine(50,getString(receiptData.get(16 + (pageIndex*noOfDataPerPage))),0,null)+CONTROL_LF);
pw.print(generateLine(10,
(getString(receiptData.get(13 + (pageIndex*noOfDataPerPage)))+" "+
getString(receiptData.get(17 + (pageIndex*noOfDataPerPage)))+" "+
getString(receiptData.get(18 + (pageIndex*noOfDataPerPage)))+" "+
getString(receiptData.get(19 + (pageIndex*noOfDataPerPage)))+" "+
getString(receiptData.get(20 + (pageIndex*noOfDataPerPage)))),50,
getString(receiptData.get(16 + (pageIndex*noOfDataPerPage))))+CONTROL_LF); // Cashier Details
pw.print("\u000C");
pw.close();
fos.close();
fos = null;
pw = null;
} catch (Exception e )
e.printStackTrace();
}
Similar Messages
-
Cannot change charset from 'ISO-8859-1' to 'UTF-8' ?
I've programed a web application with Facelets. As I start the first page "index.html" I got the following exception:
"java.lang.IllegalStateException: Attempt to change ContentType after calling getWriter() (cannot change charset from 'ISO-8859-1' to 'UTF-8')"
The header of the "index.html" looks as follow:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<meta http-equiv="refresh" content="0; url=./guess.jsf" />
<title>Untitled Document</title>
</head>
What's wrong? Is it a bug of weblogic?same problem here with wl8.1
have you sold it and if yes, how?
thanks -
IllegalStateException: (cannot change charset from 'ISO-8859-1' to 'null')
My index.jsp page has the directive <%@ page contentType="text/html;charset=ISO-8859-1"
%>.
It uses my templating tag-library, which uses a requestDispatcher to include my
template.
My template doesn't have this contentType directive.
Then I get an exception :
java.lang.IllegalStateException: Attempt to change ContentType after calling getWriter()
(cannot change charset from 'ISO-8859-1' to 'null')
It actually works perfectly on WLS6.0.
Here is the complete stacktrace which shows the path page -> tag -> include
java.lang.IllegalStateException: Attempt to change ContentType after calling getWriter()
(cannot change charset from 'ISO-8859-1' to 'null')
at weblogic.servlet.internal.ServletResponseImpl.setEncoding(ServletResponseImpl.java:695)
at weblogic.servlet.internal.ServletResponseImpl.setHeader(ServletResponseImpl.java:566)
at weblogic.servlet.internal.ServletResponseImpl.setContentType(ServletResponseImpl.java:236)
at weblogic.servlet.internal.ServletRequestImpl.reportJSPFailure(ServletRequestImpl.java:162)
at weblogic.servlet.internal.ServletRequestImpl.reportJSPTranslationFailure(ServletRequestImpl.java:168)
at weblogic.servlet.jsp.JspStub.reportTranslationFailure(JspStub.java:503)
at weblogic.servlet.jsp.JspStub.compilePage(JspStub.java:317)
at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:181)
at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:149)
at weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.java:344)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:240)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:200)
at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:327)
at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:207)
at bv2.template.TemplateRequest.doStartTemplate(TemplateRequest.java:56)
at bv2.template.BodyTag.doStartTag(BodyTag.java:31)
at jsp_servlet._index._jspService(_index.java:173)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:245)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:200)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:2279)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:1923)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
[att1.html]
-
JDeveloper3.1.1.2 problem:convert from UTF8 to UCS2 failed
oracleTeam:
i test JDeveloper3.1.1.2,it has problem in runtime:convertion from UTF8 to UCS2 failed ,AttributeLoadException.( our language is chinese)
I found that oracle\jbo\server\QueryCollection.class in dacf.zip maybe has problem,i use this class of JDeveloper3.1 to repalce same_name class in JDeveloper3.1.1.2,above problem disappeared,
but because this class is not suit of JDeveloper3.1.1.2,other problems appeared.
so you should work out this problem ,i hope
it runs correctly.I searched this forum and the SQLJ/JDBC forum, and found a few occurrences of this problem. Among the things people suggested:
* Changing JDBC drivers (experience varied as to which one fixed the problem)
* Adding nls_charset1x.zip to your CLASSPATH
* Ensuring you're using the same character set on the client and server.
I suggest you take a look at the following discussion threads: http://technet.oracle.com:89/ubb/Forum8/HTML/001810.html http://technet.oracle.com:89/ubb/Forum8/HTML/000065.html http://technet.oracle.com:89/ubb/Forum2/HTML/000820.html
Blaise
null -
Setting the charset from an adapter module
Hi folks,
I'm trying to set the charset encoding of a payload using an adapter module (I know there is a TextCodepageConverterBean, but I want to set the charset for a message that hasn't one yet). The problem is probably more clear using an example.
I output a UTF-8 flat string from my message mapping to the adapter framework (mail adapter in my case). Afterwards I want to convert this UTF-8 string to an ISO-8859 encoding with the TextCodepageConverterBean. But if I set the charset using the setContentType() function of my TextPayload object the information gets cut away. I'm using the format
setContentType("text/plain;charset=utf-8;name=Test.txt")
. But everything after the first semicolon is dropped. Setting the charset using the MessageTransformBean works, but I want to avoid this by all means, as I need to set the mime type from the adapter module.
This is running on NW2004 with SP 16 and the latest patch.
Any idea, why the MessageTransformBean works and not the setContentType call?This bug will be fixed with SP20.
Regards
Stefan -
How to convert back from UTF8 to ISO-8859-1 encoding?
hi,
I have a bunch of XML files which were wrongly encoded, and we lost all our accent characters.
ie: é become é
so how can I recover my XML files using powershell?
so I want to change all the UTF8 ecoded characters back to the original ISO accent character
é -> é
I try this:
1")
$utf8 = [System.text.Encoding]::UTF8
$utfBytes = $utf8.GetBytes("é")
$isoBytes = [System.text.Encoding]::Convert($utf8, $iso, $utfBytes)
$iso.GetString($isoBytes)
but doesnt works.
so is there a way to do this in powershell?
I have to scan hundreds of files...
thanks.You can't. UTF-8 strips all of the information from the characters so you cannot know which characters are which. If you know which characters you need to fix (requires knowing the spelling of the words) you could possible develop an matrix of
replacements. There is no simple one line method.
¯\_(ツ)_/¯ -
Japanese characters retrieved from UTF8 d/b from excel
Hi All,
I am generating a csv file(comma seperated) through a query from Oracle 9i database. There is one field which is Japanese. Our database is UTF8 enabled and when the csv file is opened from notepad/textpad then it is showing the Japanese characters properly but when we are opening the file from excel(which is our requirement) then the data is not coming properly.
I am copying the data below directly from the excel sheet. CLIENT_NAME_LOCAL(NVARCHAR2 field) is the field which captures japanese. It can be seen that the data for the FUND_CODE=811018 is correctly coming but for 809985 it is seen that the CLIENT_NAME_LOCAL and FUND_CODE columns are getting concatenated with a ・ sign in the middle and so in the FUND_CODE column the FROM_DATE value is coming, though the delimition ',' can be seen between the two fields when I'm opening the file from notepad. It is to be noted that I've used the CONVERT function in my query after this to change the CLIENT_NAME_LOCAL column to 'JA16SJIS' characterset but nothing got changed.
N.B- I've copy and paste the data from excel so in the html format it seems that the FUND_CODE and FROM_DATE values are on the same vertical line but it is not so.
==========================================================
TYPE CLIENT_NAME_LOCAL FUND_CODE FROM_DATE
AN 譚ア驍ヲ逑ヲ譁ッ譬ェ蠑丈シ夂、セ 811018 01/09/2005
AN 譚ア驍ヲ逑ヲ譁ッ譬ェ蠑丈シ夂、セ 811018 01/09/2005
AN 譚ア驍ヲ逑ヲ譁ッ譬ェ蠑丈シ夂、セ 811018 01/09/2005
AN 譚ア驍ヲ逑ヲ譁ッ譬ェ蠑丈シ夂、セ 811018 01/09/2005
AN 譚ア驍ヲ逑ヲ譁ッ譬ェ蠑丈シ夂、セ 811018 01/09/2005
AN 譚ア驍ヲ逑ヲ譁ッ譬ェ蠑丈シ夂、セ 811018 01/09/2005
AN 譚ア驍ヲ逑ヲ譁ッ譬ェ蠑丈シ夂、セ 811018 01/09/2005
AN 譚ア驍ヲ逑ヲ譁ッ譬ェ蠑丈シ夂、セ 811018 01/09/2005
AN 譚ア驍ヲ逑ヲ譁ッ譬ェ蠑丈シ夂、セ 811018 01/09/2005
AN 譬ェ蠑丈シ夂、セ縲蝠・飴荳我コ・809985 01/09/2005
AN 譬ェ蠑丈シ夂、セ縲蝠・飴荳我コ・809985 01/09/2005
AN 譬ェ蠑丈シ夂、セ縲蝠・飴荳我コ・809985 01/09/2005
AN 譬ェ蠑丈シ夂、セ縲蝠・飴荳我コ・809985 01/09/2005
AN 譬ェ蠑丈シ夂、セ縲蝠・飴荳我コ・809985 01/09/2005
AN 譬ェ蠑丈シ夂、セ縲蝠・飴荳我コ・809985 01/09/2005
AN 譬ェ蠑丈シ夂、セ縲蝠・飴荳我コ・809985 01/09/2005
AN 譬ェ蠑丈シ夂、セ縲蝠・飴荳我コ・809985 01/09/2005
AN 譬ェ蠑丈シ夂、セ縲蝠・飴荳我コ・809985 01/09/2005
Data in notpad
====================
=======================================================
TYPE,CLIENT_NAME_LOCAL,FUND_CODE,FROM_DATE,
AN,東邦瓦斯株式会社,811018,01/09/2005,
AN,東邦瓦斯株式会社,811018,01/09/2005,
AN,東邦瓦斯株式会社,811018,01/09/2005,
AN,東邦瓦斯株式会社,811018,01/09/2005,
AN,東邦瓦斯株式会社,811018,01/09/2005,
AN,東邦瓦斯株式会社,811018,01/09/2005,
AN,東邦瓦斯株式会社,811018,01/09/2005,
AN,東邦瓦斯株式会社,811018,01/09/2005,
AN,東邦瓦斯株式会社,811018,01/09/2005,
AN,株式会社 商船三井,809985,01/09/2005,
AN,株式会社 商船三井,809985,01/09/2005,
AN,株式会社 商船三井,809985,01/09/2005,
AN,株式会社 商船三井,809985,01/09/2005,
AN,株式会社 商船三井,809985,01/09/2005,
AN,株式会社 商船三井,809985,01/09/2005,
AN,株式会社 商船三井,809985,01/09/2005,
AN,株式会社 商船三井,809985,01/09/2005,
AN,株式会社 商船三井,809985,01/09/2005,
Thanks & Regards,
SudiptaYou can open UTF-8 files in excel:
1. change file extension to .txt
2. in excel: Open/File -> point to your file
3. excel opens file convert dialog, in "file origin" field choose: "65001:Unicode (UTF-8)"
4. proceed with other setting - You got it!
This procedure work for sure in Excel 2003
Regards
Pawel -
How to retrive Original Character in Unicode Format from UTF8
Our Database is enabled UTF8 format.User entered some data through UI(html forms),which is stored as â?? (whose ascii values are 50082,49792,49817 respectively,as the data is displaying in different way here ,I am giving here with the ascii values)in to the Database.When we retrive the data into UI or into a text file(.txt) it is displaying/storing as ’(Ascii value is 15712189).How to check for is that character correct or not.
Ashok,
What is your NLS_LANG setting on the client machine where FORMS is running?
To see if the value is stored properly in the database you can use the DUMP command. You can find this in the SQL Reference. But here is a desription:
he syntax of the function call is:
DUMP( <value> [, <format> [, <offset> [, <length> ] ] ] )
where:
value - is the value to be displayed
format - is a number which describes the format in which bytes of the value are to be displayed: 8 - means octal, 10 - means decimal, 16 - means hexadecimal; other values between 0 and 16 mean decimal; values greater then 16 are a little confusing and mean: print bytes as ASCII characters if they correspond to printable ASCII codes, print them as "^x" if they correspond to ASCII control codes and print them in hexadecimal otherwise; adding 1000 to the format number will add character set information for the character data type values to the return value offset - is the offset of the first byte of the value to display; negative values mean counting from the end length - is the number of bytes to display. So for example,
SQL> SELECT DUMP(col,1016)FROM table ;
Typ=1 Len=39 CharacterSet=UTF8: 227,131,143,227,131,170
returns the value of a column consisting of 3 Japanese characters in UTF8 encoding . For example the 1st char is 227(*255)+131. You will probably need to convert this to UCS2 to verify the codepoint value with the Unicode Standard version 3.0. -
CANNOT blob in ole_container from UTF8 db
I sucessfully insert and retrieve WORD doc in blob field to and ole container. The DB is ZHT16BIG5. However, after I change the database to UTF8. I can only insert WORD doc from OLE_container into a BLOB field. But when I retrieve it, it will cause system error.
I use Form 6i patch 10 to create the form. Is there any reason why the UTF8 affect the result?Hi Kanekan, Duncan,
I'm having the same trouble. Currently trialling a DB upgrade from Oracle9iR2 to Oracle10gR2. We are using an Forms6i application (6.0.8.18.0) and have a few screens which use OLE, mainly for RTF/Word documents. We run these screens in Client/Server mode using Citrix (We have a lot of users coming in on low speed connections).
I upgraded by building a new machine, SUSE Linux 9.3 and Oracle10gR2 DB and then importing the production schema. Everything else (other forms, etc) work fine, but the OLE Docs, on opening, give a FRM-40505 error - stating that there is an inconsistent datatype (ORA-00932). I've also tried creating a new document, but get the same error.
I was planning on creating a DB Link from the new to the old DB - and re-copying the BLOB documents across - thinking that the issue may have been with the export/import; however, as creating a brand new document has the same issue then I'm guessing the error is not Character type, etc related.
I've also tried this with verson 6.0.8.24.0 of Forms, but get the same problem.
Any ideas or help would be greatly appreciated.
Cheers
Jeremy -
ORA-01461 while importing from UTF8 to AL32UTF8
Hello All,
Source Env: 9i on Solaris
Dest Env: 10.2.0.3 on Solaris 10
We have a table in a UTF8 database(9i).
While trying to import it into a AL32UTF8, it terminates with
IMP-00058: ORACLE error 1461 encountered
ORA-01461: can bind a LONG value only for insert into a LONG column
IMP-00028: partial import of previous table rolled back: 9170 rows rolled back The table has a column with LONG datatype.
Is this error because of the characterset conversion ?
TIA,
JJSrini,
I checked that already.
This table does not have LOB datatype. Only NUMBER,VARCHAR2,DATE and LONG.
Moreover, i tried with and without pre creating the table. Both ways result in this error.
TIA,
J J -
Troubleshooting getting Japanese charset from Imap server.
i have some content in japanese.
the charset is ISO-2022-JP.
i have the content in a StribBuffer format.
how can i read it in the proper format.
I suppose such an answer can be generalized to any inetrnational charset.
thanks for your help.
pascal.convert your international charset content to ISO-8859-1.
and set your Browser to select automaticaly th appropriate language.
String contentString;
byte[] byteLocalizedContent= contentString.getBytes(contentParts.getCharset())
String localContent = new String(byteLocalizedContent, "ISO-8859-1")
pascal. -
Issues with charsets from NUC ERP system to UC BI System
Hi guys
We are actually in the process of Upgrading and Unicode Migration for BI and ERP Landscape
BI Landscape is the first stage so we are facing an issue with char sets
ERP system generates a plain txt file which is later pick up by BI system to run a chain process.
This plain txt file, contains Spanish Special chars which are causing the issues.
I have found a note which converts file at OS level from one code page to another code page
Is there another more transparent solution, like forcing NUC ERP System to generate the plain file in a format which can be read by UC BI System
Best
MartinYou have posted in wrong space. Please post your query on the correct space so thate xperts could help you.
regards
manu -
Modifying the Charset from ISO0646-US to ISO8859-1
I have been assigned with a task of modifying the current charset ISO0646-US to ISO8859-1. But I did a try appending the -Dfile.encoding=ISO8859-1 as a argument in start-up.properties in all managed and admin server and bounced both . Even still im finding the same OLD char-set. when I try using a jsp script to check the File encoding.
Script : System.getProperty("file.encoding"));
Result: ISO646-US.
I even Cross verified all the Font Config Files of Weblogic in Unix, every file is appended with ISO8859-1 but not with ISO646-US. But script give out a result ISO0646-US.
Here are the files that resulted with ISO8859 but not ISO0646.
/tools/weblogic/92sp2/jdk150_22/jre/lib/rt.jar
/tools/weblogic/92sp2/jdk150_22/jre/lib/fontconfig.properties.src
/tools/weblogic/92sp2/jdk150_22/jre/lib/fontconfig.5.8.properties.src
/tools/weblogic/92sp2/jdk150_22/jre/lib/sparc/client/classes.jsa
/tools/weblogic/92sp2/jdk150_22/jre/lib/fonts/fonts.dir
/tools/weblogic/92sp2/jdk150_22/jre/lib/flavormap.properties
/tools/weblogic/92sp2/jdk150_10/jre/lib/rt.jar
/tools/weblogic/92sp2/jdk150_10/jre/lib/sparc/client/classes.jsa
/tools/weblogic/92sp2/jdk150_10/jre/lib/fontconfig.5.8.properties.src
/tools/weblogic/92sp2/jdk150_10/jre/lib/fonts/fonts.dir
/tools/weblogic/92sp2/jdk150_10/jre/lib/fontconfig.properties.src
/tools/weblogic/92sp2/jdk150_10/jre/lib/flavormap.properties
jre/lib/rt.jar
jre/lib/fontconfig.properties.src
jre/lib/fontconfig.5.8.properties.src
jre/lib/sparc/client/classes.jsa
jre/lib/fonts/fonts.dir
jre/lib/flavormap.properties
Help needed, to identify the right file or configuration to modify this.
Thanks in Advance.
Regards
BShope the bapi is correct
all the nodes (elements) are correct and its has linkage between the backend tables
and datatypes are same
please verify the above ones
let me know where your are getting error again
regards
ravindra -
[SOLVED] How to Create an Image from UTF8 Text via Command-line
As the title points out, I'm trying to create an image from unicode text via command line. I tried...
convert -pointsize 48 -size 400 caption:测试用 text.png
But that results in question marks for the Chinese characters. So searching around online I discovered that I needed to specify a font which could display the characters. The characters show up just fine in Firefox, KDE, Kate, Terminal, etc so I know I have a font which can render them. I thought it might be DejaVu but this also resulted in question marks...
convert -font /usr/share/fonts/TTF/DejaVuSerif.ttf -pointsize 48 -size 400 caption:测试用 text.png
Any ideas?
Last edited by tony5429 (2011-01-31 23:17:41)DejaVu doesn't contain those Chinese glyphs at all, so please don't blame ImageMagick for not rendering them.
So, Firefox, Kate, Terminal and the others you stated to use DejaVu, if encounter these characters, fall back to some other fonts to render them. These fonts are, however, not vector, but bitmap fonts. (This can be seen if you increase text size (Ctrl++ in Firefox): the Chinese characters don't change, they remain of their inherent size.)
Actually, e.g. /usr/share/fonts/misc/18x18ko.pcf.gz definitely contains the three example characters, so the mentioned apps may use this font as fall back.
Apparently ImageMagick doesn't handle bitmap fonts (I'm not sure), so you won't be able to hit your original target. Anyway, since you tried to parse "-pointsize 48", you wouldn't be satisfied with the font size.
Your only choice seems to be using the above mentioned CJK-approved TTFs.
EDIT: typo
Last edited by barto (2011-01-28 21:52:33) -
Changing charset from UTF-8 to iso-8859-1
Hi,
I am deploying my web service in Weblogic Server 9.2.2.
The result is returned using encoding "UTF-8". How can I
alter this so that the result wil be returned using encoding "iso-8859-1"? Could some one help please?
Thanks in advacne
MikeWhat's the source of the "generated content"? I think you'd be better off investigating how to get that source to generate UTF-8 content.
Changing the meta tag won't give you what you want, because it will cause all the accented characters (and anything else outside ASCII) that are entered directly in Muse to be handled incorrectly by the browser.
Maybe you are looking for
-
I am in the middle of a job using CS 6, but at the same time opening the Creative Suite apps. I created an InDesign file in CS 6, saved it, and now I can't open it. I'm getting this message: Cannot open file because it was saved with a newer version
-
(HELP!)After upgrading to Mavericks, windows xp is not working
I have upgraded to Mavericks. But now I can't get into windows xp. what I usually do is hold on to "option" to get into XP. instead have" MAC" " Windows" I have a third disck called " recover 10.9" I then choose to open via Windows. It then ask m
-
hi all. i'm developing an application using jsf and tiles. i've some problem in the general layout page. how can I refer to images and files,if I don't know where the page will be used? with struts i've used <html:rewrite page=" ... " /> but it doesn
-
Simulation Capture Problem CP4 - last character in text box cut off.
This is somewhat difficult for me to explain, but here is what we are experience. The issue we are having is when capturing a demonstration or simulation of our Windows based form in Captivate 4, occasionally the last character of text in a text box
-
Htmldb_lang.message used in non HTMLDB session?
Hi, I have some pl/sql code that is used from a HTMLDB page. The code uses htmldb_lang.message and works fine. The same code is also used from another session in a report servlet, but here the messages are not returned. I only get the name of the nam