Unencode a UTF-8 data
Hi,
I need to "un-encode" a UTF-8 data that is obtained from the HTTP header from mod_sso. The encoding is done in C and this the standard encoding process that is followed, The requirement is to "un-encode" this information at PL/SQL level and then pass the information further ahead in the program. Since the encoding is done in a standard way, I wanted to figure out if there is any ready to use API to decode it.
The output that is get which is there in the UTF-8 encoded fashion is
?UTF-8?Q?cn=3D=E7=94=A8=E6=88=B7=E4=B8=80,cn=3Dusers,=20dc=3Dus,dc=3Doracle,dc=3Dcom?
Any pointers related to this will be appreciated.
Thanks for your help
- Abhishek
Kerberos V is not internationalized. Applications are expected to provide
ASCII characters with Kerberos, which is in compliance with the specification.
Non-ASCII username/passwords are not supported under the present definition.
There is an ongoing effort at IETF to address this.
Seema
Similar Messages
-
Crystal Report 9 - Can't Display UTF-8 Data
Dear Sir,
I am using PHP with Crystal Report 9.2 and has problem displaying UTF-8 data from MSSQL field. It shows weird characters instead. I am very sure the data stored in database is in UTF-8 because when I ouput it into the web browser with encoding as UTF-8, it shows correctly. Currently is using ADODB recordset to pass data into CR. I tried using ODBC to connect directly to database and preview the data - same issue.
Now I wonder whether are there any settings need to be done in CR in order to display unicode correctly? From what I read, CR 9 and above should be able to support unicode.
Thanks
ALTo be honest, I have no idea if TTX files supported UTF-8... I kinda doubt it. I'd check, but the only person I knwo of that may have a clue is not in until September 28...
Re. ODBC, see if adding the following option to your DSN entry in the odbc.ini file will help:
stmt = SET CHARACTER SET utf8
Also, if I remember right, MS SQL does not install UTF-8 support by default (at least at one time or another it did not...(?).
Oh - one more thing. I've attached a non CR app that I'd like you to use to see what the data it returns looks like. Please give that a try.
- Ludek
Edited by: Ludek Uher on Sep 7, 2011 10:43 AM -
Unexpected XMP_Error Invalid UTF-8 data byte
Hi all,
I'm using the XMP SDK 4.4.2 and with it the sample application "xmpcommands". This one is extremely helpful - but it fails when using files that have Umlauts(öäü) in the name. When calling, i.e.
xmpcommand.exe get c:\Fileöäü.jpg
the command returns:
Unexpected XMP_Error Invalid UTF-8 data byte
As soon as I remove the umlauts all is fine. I tracked to problem down to the function ToUTF16Native called from GetFileMode in xmpfiles_impl.cpp:
FileMode GetFileMode ( const char * path )
std::string utf16; // GetFileAttributes wants native UTF-16.
ToUTF16Native ( (UTF8Unit*)path, strlen(path), &utf16 );
utf16.append ( 2, '\0' ); // Make sure there are at least 2 final zero bytes.
It seems that the file path is NOT UTF8 encoded. This very likely as I'm working on Windows and there the command line encoding is ANSI.
Is there something special I need to set when compiling on Windows?
Does anyone have a solution for this?
[UPDATE]
I've converted the file path to UTF8 and now this error does not occure BUT now I get the error, that the file was not found! Grrr.....
Cheers & THANKS,
Jens
www.finalcandidate.comHi,
Input to OpenFile() function needs to be a UTF8 string. "flówér.jpg" is in WinANSI, and needs to be converted to UTF8 string so that OpenFile can correctly find the file.
For example, on Windows OS, you need to define a function as:
void WinEncodingToUTF8 ( UINT codePage, const XMP_Uns8 * hostPtr, size_t hostLen, std::string * utf8 )
int utf16Len = MultiByteToWideChar ( codePage, 0, (LPCSTR)hostPtr, (int)hostLen, 0, 0 );
std::vector<UTF16Unit> utf16 ( utf16Len, 0 ); // MultiByteToWideChar returns native UTF-16.
(void) MultiByteToWideChar ( codePage, 0, (LPCSTR)hostPtr, (int)hostLen, (LPWSTR)&utf16[0], utf16Len );
FromUTF16Native ( &utf16[0], (int)utf16Len, utf8 );
This function requires a function which is present in the file "UnicodeConversions.cpp". So you need to include a file "source/UnicodeConversions.hpp" in your project.
The sample usage could be:
std::string outputPath;
WinEncodingToUTF8( 1252, (const XMP_Uns8 *)inputFile.c_str(), inputFile.size(), &outputPath ); -
My Environment is Weblogic 6.1 SP2 on WIN2K.
I have an HTTP client sending an HTTP request with
Content-Type=application/x-www-form-urlencoded
the data in HTTP request is in UTF-8. Note that HTTP client does not specify charset=UTF-8
as part of the Content-Type.
I have a servlet "VosXmlEvents" processing this HTTP request.
The HTTP request contains data like “Zoë” which the servlet below
interprets as “Zoë” causing me to think that my deployment settings
might be wrong.
My Deployment settings:
In weblogic.xml deployment descriptor I have specified following:
<charset-params>
<!-- I specified this so that I can tell to weblogic that HTTP request data is
UTF-8 so weblogic can successfully convert it to ISO-8859-1 as per Java servlet
spec.-->
<input-charset>
<resource-path>/vos/events/xml/*</resource-path>
<!-- I tried both UTF8 and UTF-8 and got same results-->
<java-charset-name>UTF8</java-charset-name>
</input-charset>
<!-- I specified the the settings below just to be on the safe side, as I have
seen java documentation, newsgroups etc. using slightly different, names for the
same char encoding/canonical names . Java uses MIME preferred names,I think I
dont have to do this but I hope specifying these should not do any harm either,
am I correct in assuming it? (see reference 1 and 2. below for details)-->
<charset-mapping>
<iana-charset-name>ISO_8859-1:1987</iana-charset-name>
<java-charset-name>ISO-8859-1</java-charset-name>
</charset-mapping>
<charset-mapping>
<iana-charset-name>ISO_8859-1:1987</iana-charset-name>
<java-charset-name>ISO8859_1</java-charset-name>
</charset-mapping>
<charset-mapping>
<iana-charset-name>UTF-8</iana-charset-name>
<java-charset-name>UTF-8</java-charset-name>
</charset-mapping>
<charset-mapping>
<iana-charset-name>UTF-8</iana-charset-name>
<java-charset-name>UTF8</java-charset-name>
</charset-mapping>
</charset-params>
My web.xml has:
<servlet>
<servlet-name>VosXmlEvents</servlet-name>
<servlet-class>some class name</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>VosXmlEvents</servlet-name>
<url-pattern>/vos/events/xml/*</url-pattern>
</servlet-mapping>
According to Servlet spec. 2.3 sec. SRV.4.9 Request data encoding, cut pasting
from spec below:
"Currently, many browsers do not send a char encoding qualifier with the Content-Type
header, leaving open the determination of the character encoding for reading HTTP
requests. The default encoding of a request the container uses to create the request
reader and parse POST data must be “ISO-8859-1”, if none has been
specified by the client request. However, in order to indicate to the developer
in this case the failure of the client to send a character encoding, the container
returns null from the getCharacterEncoding method.
If the client hasn’t set character encoding and the request data is encoded
with a different encoding than the default as described above, breakage can occur.
To remedy this situation, a new method setCharacterEncoding(String enc) has been
added to the ServletRequest interface. Developers can override the
character encoding supplied by the container by calling this method. It must be
called prior to parsing any post data or reading any input from the request. Calling
this method once data has been read will not affect the encoding."
Q1. Should not <input-charset> related settings in weblogic.xml for a servlet
helps container actually do some thing like setCharacterEncoding(String enc) on
HTTP Request before it call the servlet?
Q2. If not then that would mean I have to programatically call setCharacterEncoding(String
enc)to correctly interpret my HTTP Request?
Q3. If the answer to Q1 is "yes" then I will assume that getInputStream() or getReader()
methods on the HttpServletRequest will give the chacter in the client encoded
format which in this case is UTF-8, i.e I will get "Zoë" as in this example. Am
I correct here?
Reference:
1. http://edocs.bea.com/wls/docs70/webapp/components.html#139932
2. http://java.sun.com/j2se/1.3/docs/guide/intl/encoding.doc.htmlStefan,
Thanks for the information. I have the following question then.
The Webserver I am interacting with does not recognize user and password provided in the channel. It accepts user and pwd in payload and in application/x-www-form-urlencoded content type only.
Sample Raw Post that server server requires looks like this
User=yourname&Password=yourpassword&INPUT_XML=%3C%3Fxmlversion%3D%221.0%22standalone%3D%22no%22%3F%3E%3CDELIVERY%3E%3CMESSAGE%3E%0D%0A++++%3CDESTINATION_ADDR%3E%2B447900570205%3C%2FDESTINATION_ADDR%3E%%3C%2FMESSAGE%3E%0D%0A%0D%0A%3C%2FDELIVERY%3E%
What i have done is that constructed the post manually in Java code in un encoded form and expected the HTTP Adapter to do the encoding. Having done this, the HTTP Server is able to scuccessfully parse the xml except for & and < , > chars which err out as invalid XML.
Is there an elegant way of doing above scenario using XML post and standard HTTP Adapter.
Best Regards,
Sudharshan N A -
Hi,
Have installed Oracle (8.1.6) japanese client on windows 2000 japanese workstation
and using DBA studio, i'm looking at
UTF-8 japanese database hosted on another
oracle 8i windows2000 machine.
My problem is that i'm getting junk data.
Despite of the fact i can look at the
data from a browser
Thanks
ppsrDid you specified the correct NLS_LANG parameter ?
Take a look into the Globalization Support FAQ at:
http://technet.oracle.com/products/oracle8i/ for environment configuration information -
Hello everyone.
I have a question about parsing UTF-8 document. What im doing, is that im parsing it and putting the values into database. Anyway, if i have an UTF 8 value as this "ü" then i want it to be ü in database. It means i need the data decoded. Is there a simple way to do it with JAXB or not? If not, then how can i do it?My input is different than what is there in the forum.
The input for JAXB is as follows
Departamento de Aná ;lises Clí ;nicas e Toxicoló ;gicas(I have added a space before ";" just to show the actual input)
After Unmarshall JAXB returns
Departamento de AnaÌlises CliÌnicas e ToxicoloÌgicasIs there a way to get the JAXB output as
Departamento de Aná ;lises Clí ;nicas e Toxicoló ;gicas(Again added space before ";" to show the output format)
Thanks
Mukund -
Trying to get UTF-8 data in and out of an oracle.xdb.XMLType
I need to be able to put unicode text into an oracle.xdb.XMLType and
then get it back out. I'm so close but it's still not quite working.
Here's what I'm doing...
// create a string with one unicode character (horizontalelipsis)
String xmlString = new String(
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" +
"<utf8>\n" +
" <he val=\"8230\">\u2026</he>\n" +
"</utf8>\n");
// this is an oci8 connection
Connection conn = getconnection();
// this works with no exceptions
XMLType xmlType = XMLType.createXML(conn, xmlString);
// this is the problem here - BLOB b does not contain all the bytes
// from xmlType. It seems to be short 2 bytes.
BLOB b = xmlType.getBlobVal(871);
String xmlTypeString = new String(b.getBytes(1L, (int) b.length()), "UTF-8");
PrintStream out = new PrintStream(System.out, true, "UTF-8");
out.print(xmlTypeString);
out.close();
What I get from this is this...
<?xml version="1.0" encoding="UTF-8"?>
<utf8>
<he val="8230">[utf-8 bytes]</he>
</utf8
In the above, [utf-8 bytes] represents the correctly encoded UTF-8 bytes that
were returned. But the output is missing the final closing bracket and the
newline at the end. It seems that no matter what second argument I give b.getBytes(),
it always returns the above. Even
It seems that this code...
BLOB b = xmlType.getBlobVal(871);
always returns a BLOB that contains a few bytes short of what it should contain.
What am I doint wrong? I'm sure I'm missing something here.
Thanks much for your help.
Here's info about the environment I'm working in.
============================ SYSTEM INFORMATION ============================
SQL*Plus: Release 11.1.0.7.0 - Production on Fri May 15 11:54:34 2009
select * from nls_database_parameters
where parameter='NLS_CHARACTERSET'
returns...
WE8ISO8859P1
select * from nls_database_parameters
where parameter='NLS_NCHAR_CHARACTERSET'
returns...
AL16UTF16
The operating system I'm working with is...
SunOS hostname 5.10 Generic_120011-14 sun4u sparc SUNW,Netra-T12WE8ISO8859P1 does not support the ellipsis character. It is a WE8MSWIN1252 character. I wonder if your problem may have something to do with internal conversion to/from XML character reference (…). Unfortunately, I have no time to test. Please, try to use a simple loop and System.out.print to print all bytes of the return value of b.getBytes(1L, (int) b.length()). Also, check the value of b.length().
-- Sergiusz -
Sending UTF-8 data via http post
Hello,
I'm generating an xml to be sent via http post method. Before sending, I'd like to convert it to utf-8, but Oracle converts it to utf-16, no matter what I do.
This is what I send with utl_http.write_text:
convert(l_clob,'AL32UTF8')...but I see utf-16 encoded output on the server side.
NLS_RDBMS_VERSION is 10.2.0.1.0
NLS_CHARACTERSET is EE8ISO8859P2
NLS_NCHAR_CHARACTERSET is AL16UTF16
But I do not use NCHAR variables.
Is http post considered like exporting, where the os's NLS_LANG is important?
Earlier, I managed to save utf-8 xml-files without setting any NLS% params. It was with:
UTL_FILE.PUT_RAW(
file => file_handle,
buffer => UTL_RAW.CONVERT(utl_raw.cast_to_raw(buffer),
'AMERICAN_AMERICA.AL32UTF8',
'AMERICAN_AMERICA.'||charset
);But this does not seem to work here, since I have to send 'text/xml'...
Any help is appreciated.
Thanks,
LaszloNot really the correct forum.. The methods you are using are more a PL/SQL issue than an XML DB issue. In general Oracle will convert the response into the character set requested by the client, are you sure your client is not requesting UTF-16.
Edited by: mdrake on Nov 27, 2010 5:42 PM -
Escaped data to UTF-8, i.e. 「
Hi everyone!
I have a form that needs to be in ISO-8859-1 format, because the form data is inserted into a database that expects ISO-8859-1.
At one point, I need to get the data out of the database and insert it into another database that accepts only UTF-8 data.
When I insert asian characters into the first database, the Web server automatically converts the asian characters into escaped characters, i.e. 「 (but the & # version - the forum is converting the symbol here :-(). That's the way it's inserted into the database. That is okay. I want it that way.
When I get out data from that database, I get the escaped characters. Now, I need to convert the data to UTF-8 so I can put it into the other database.
Is there a way to convert the escaped data into UTF-8 data?
dailysun
Message was edited by:
dailysunFirst off, you don't need to convert the data to UTF-8. When you insert it into the other database, you should be able to specify "UTF-8" as the encoding, and the conversion will be done for you.
So your real problem is merely to convert the HTML escapes back to the characters they represent. That should be a simple matter of extracting the numerical portion of the escape, parsing it with Integer.parseInt(), and casting the resulting int to a char. The regex package makes the process relatively painless: private static Pattern numRefPattern =
Pattern.compile("&#(?:(\\d++)|[Xx](\\p{XDigit}++));");
public static String unescapeHTML(String source)
Matcher m = numRefPattern.matcher(source);
StringBuffer sb = new StringBuffer(source.length());
while (m.find())
// append any text between the last match and the current one
m.appendReplacement(sb, "");
// find out whether it was a decimal or hex escape and parse accordingly
int value = m.start(1) != -1
? Integer.parseInt(m.group(1));
: Integer.parseInt(m.group(2), 16);
if (!Character.isDefined(value))
throw new IllegalArgumentException("No such character: " + m.group());
sb.append((char)value);
// append whatever text followed the final match
m.appendTail(sb);
return sb.toString();
}This code is untested, but the technique is one I use often.
If your data might contain characters whose Unicode values are too large to fit in a 16-bit char, the process becomes a bit more complicated, but (as of JDK 1.5) the Character class has methods to handle them, too. If you're only dealing with the major asian character sets (i.e., CJK), I don't think you have to worry about that. -
Active Sync - No data displayed in Outlook 2013
Hello,
We are currently developing Active Sync support for SOGo (www.sogo.nu). Everything works well with Android and iOS based devices but Outlook 2013 doesn't work.
The FolderSync command works well, but the initial Sync request seems to be ignored by Outlook, as it keeps sending it over and over. Here is the initial FolderSync response:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE ActiveSync PUBLIC "-//MICROSOFT//DTD ActiveSync//EN" "http://www.microsoft.com/">
<FolderSync xmlns="FolderHierarchy:">
<Status>1</Status>
<SyncKey>1</SyncKey>
<Changes>
<Count>9</Count>
<Add>
<ServerId>mail/INBOX</ServerId>
<ParentId>0</ParentId>
<Type>2</Type>
<DisplayName>INBOX</DisplayName>
</Add>
<Add>
<ServerId>mail/Drafts</ServerId>
<ParentId>0</ParentId>
<Type>3</Type>
<DisplayName>Drafts</DisplayName>
</Add>
<Add>
<ServerId>mail/Sent</ServerId>
<ParentId>0</ParentId>
<Type>5</Type>
<DisplayName>Sent</DisplayName>
</Add>
<Add>
<ServerId>mail/Trash</ServerId>
<ParentId>0</ParentId>
<Type>4</Type>
<DisplayName>Trash</DisplayName>
</Add>
<Add>
<ServerId>mail/Aaaaappppp</ServerId>
<ParentId>0</ParentId>
<Type>12</Type>
<DisplayName>Aaaaappppp</DisplayName>
</Add>
<Add>
<ServerId>mail/Shared Folders/bar</ServerId>
<ParentId>0</ParentId>
<Type>12</Type>
<DisplayName>Dossiers partagés/bar</DisplayName>
</Add>
<Add>
<ServerId>vevent/personal</ServerId>
<ParentId>0</ParentId>
<Type>8</Type>
<DisplayName>Personal Calendar</DisplayName>
</Add>
<Add>
<ServerId>vtodo/personal</ServerId>
<ParentId>0</ParentId>
<Type>7</Type>
<DisplayName>Personal Calendar</DisplayName>
</Add>
<Add>
<ServerId>vcard/personal</ServerId>
<ParentId>0</ParentId>
<Type>9</Type>
<DisplayName>Personal Address Book</DisplayName>
</Add>
</Changes>
</FolderSync>
Here is the initial Sync response:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE ActiveSync PUBLIC "-//MICROSOFT//DTD ActiveSync//EN" "http://www.microsoft.com/">
<Sync xmlns="AirSync:">
<Collections>
<Collection>
<SyncKey>-1</SyncKey>
<CollectionId>mail/INBOX</CollectionId>
<Status>1</Status>
</Collection>
<Collection>
<SyncKey>-1</SyncKey>
<CollectionId>vevent/personal</CollectionId>
<Status>1</Status>
</Collection>
<Collection>
<SyncKey>-1</SyncKey>
<CollectionId>vcard/personal</CollectionId>
<Status>1</Status>
</Collection>
<Collection>
<SyncKey>-1</SyncKey>
<CollectionId>mail/Trash</CollectionId>
<Status>1</Status>
</Collection>
<Collection>
<SyncKey>-1</SyncKey>
<CollectionId>mail/Sent</CollectionId>
<Status>1</Status>
</Collection>
<Collection>
<SyncKey>-1</SyncKey>
<CollectionId>vtodo/personal</CollectionId>
<Status>1</Status>
</Collection>
<Collection>
<SyncKey>-1</SyncKey>
<CollectionId>mail/Aaaaappppp</CollectionId>
<Status>1</Status>
</Collection>
<Collection>
<SyncKey>-1</SyncKey>
<CollectionId>mail/Shared Folders/bar</CollectionId>
<Status>1</Status>
</Collection>
</Collections>
</Sync>
After that, here is the other Sync response:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE ActiveSync PUBLIC "-//MICROSOFT//DTD ActiveSync//EN" "http://www.microsoft.com/">
<Sync xmlns="AirSync:">
<Collections>
<Collection>
<SyncKey>127-317</SyncKey>
<CollectionId>mail/INBOX</CollectionId>
<Status>1</Status>
<Commands>
<Add xmlns="AirSync:">
<ServerId xmlns="AirSync:">125</ServerId>
<ApplicationData xmlns="AirSync:">
<From xmlns="Email:">[email protected]</From>
<To xmlns="Email:">[email protected]</To>
<Subject xmlns="Email:">test plain 1</Subject>
<DateReceived xmlns="Email:">20140114T133337Z</DateReceived>
<Importance xmlns="Email:">1</Importance>
<Read xmlns="Email:">1</Read>
<MessageClass xmlns="Email:">IPM.Note</MessageClass>
<InternetCPID xmlns="Email:">65001</InternetCPID>
<Body xmlns="AirSyncBase:">
<Type>4</Type>
<EstimatedDataSize>772</EstimatedDataSize>
<Truncated>0</Truncated>
<Data>Return-Path: <[email protected]>
Received: from sogo.example.com (localhost [127.0.0.1])
by sogo (Cyrus v2.4.12-Debian-2.4.12-2) with LMTPA;
Tue, 14 Jan 2014 08:33:37 -0500
X-Sieve: CMU Sieve 2.4
Received: from localhost (localhost [127.0.0.1])
by sogo.example.com (Postfix) with ESMTP id AA70A2801A1
for <[email protected]>; Tue, 14 Jan 2014 08:33:37 -0500 (EST)
User-Agent: SOGoMail 2.1.2
X-Forward: 172.20.20.7
MIME-Version: 1.0
from: "Wolfgang Fritz" <[email protected]>
subject: test plain 1
message-id: <6a3b-52d53c80-1-61634300@97912150>
to: "sogo10" <[email protected]>
content-type: text/plain; charset="utf-8"
date: Tue, 14 Jan 2014 08:33:37 -0500
content-transfer-encoding: 7bit
test plain 1
</Data>
</Body>
<ContentClass xmlns="Email:">urn:content-classes:message</ContentClass>
<Flag xmlns="Email:">
<FlagStatus>0</FlagStatus>
</Flag>
<NativeBodyType xmlns="AirSyncBase:">4</NativeBodyType>
</ApplicationData>
</Add>
<Add xmlns="AirSync:">
<ServerId xmlns="AirSync:">126</ServerId>
<ApplicationData xmlns="AirSync:">
<From xmlns="Email:">[email protected]</From>
<To xmlns="Email:">[email protected]</To>
<Subject xmlns="Email:">Event Invitation: "test meeting 1"</Subject>
<DateReceived xmlns="Email:">20140114T151104Z</DateReceived>
<Importance xmlns="Email:">1</Importance>
<Read xmlns="Email:">1</Read>
<MessageClass xmlns="Email:">IPM.Note</MessageClass>
<InternetCPID xmlns="Email:">65001</InternetCPID>
<Body xmlns="AirSyncBase:">
<Type>4</Type>
<EstimatedDataSize>3310</EstimatedDataSize>
<Truncated>0</Truncated>
<Data>Return-Path: <[email protected]>
Received: from sogo.example.com (localhost [127.0.0.1])
by sogo (Cyrus v2.4.12-Debian-2.4.12-2) with LMTPA;
Tue, 14 Jan 2014 10:11:04 -0500
X-Sieve: CMU Sieve 2.4
Received: from localhost (localhost [127.0.0.1])
by sogo.example.com (Postfix) with ESMTP id 9A0C7280C68
for <[email protected]>; Tue, 14 Jan 2014 10:11:04 -0500 (EST)
x-sogo-message-type: calendar:invitation
MIME-Version: 1.0
content-type: multipart/mixed; boundary="----=_=-_OpenGroupware_org_NGMime-29284-1389712264.533830-0------"
date: Tue, 14 Jan 2014 10:11:04 -0500
from: "Wolfgang Fritz" <[email protected]>
subject: Event Invitation: "test meeting 1"
to: "sogo10" <[email protected]>
Message-Id: <[email protected]>
------=_=-_OpenGroupware_org_NGMime-29284-1389712264.533830-0------
content-type: text/html; charset=utf-8
<html>
<head>
<style type="text/css">
.container { max-width: 600px; }
h1 { font-size: 18px; font-weight: normal; padding-bottom: 9px; border-bottom: 1px solid #ccc; }
h1 small { font-size: 12px; color: #999; }
.dl-horizontal dt { float: left; width: 120px; overflow: hidden; clear: left; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
dt { font-weight: bold; line-height: 17px; }
dt, dd { font-size: 12px; line-height: 18px; }
dt { display: block; }
h1, dd, .dl-list dt { margin-left: 130px; }
</style>
</head>
<body>
<div class="container">
<h1>Event Invitation: "test meeting 1"
<small>Wolfgang Fritz</small></h1>
<dl class="dl-horizontal">
<dt>Start:</dt>
<dd>Wednesday, January 15, 2014 - 08:00 America/Montreal
</dd>
<dt>End:</dt>
<dd>Wednesday, January 15, 2014 - 09:00 America/Montreal
</dd>
</dl>
</div>
</body>
</html>
------=_=-_OpenGroupware_org_NGMime-29284-1389712264.533830-0------
content-type: text/calendar; method=REQUEST; charset="ISO-8859-1"
content-transfer-encoding: quoted-printable
Content-Class: urn:content-classes:calendarmessage
BEGIN:VCALENDAR
PRODID:-//Inverse inc./SOGo 2.1.2//EN
VERSION:2.0
METHOD:REQUEST
BEGIN:VTIMEZONE
TZID:America/Montreal
X-LIC-LOCATION:America/Montreal
BEGIN:DAYLIGHT
TZOFFSETFROM:-0500
TZOFFSETTO:-0400
TZNAME:EDT
DTSTART:19700308T020000
RRULE:FREQ=3DYEARLY;BYMONTH=3D3;BYDAY=3D2SU
END:DAYLIGHT
BEGIN:STANDARD
TZOFFSETFROM:-0400
TZOFFSETTO:-0500
TZNAME:EST
DTSTART:19701101T020000
RRULE:FREQ=3DYEARLY;BYMONTH=3D11;BYDAY=3D1SU
END:STANDARD
END:VTIMEZONE
BEGIN:VEVENT
UID:7264-52D55380-1-3CD17680
SUMMARY:test meeting 1
CLASS:PUBLIC
ATTENDEE;PARTSTAT=3DNEEDS-ACTION;CN=3Dsogo10;ROLE=3DREQ-PARTICIPANT;RSV=
P=3DTRUE:mai
lto:[email protected]
ORGANIZER;CN=3DWolfgang Fritz:mailto:[email protected]
CREATED:20140114T151104Z
DTSTAMP:20140114T151104Z
LAST-MODIFIED:20140114T151104Z
DTSTART;TZID=3DAmerica/Montreal:20140115T080000
DTEND;TZID=3DAmerica/Montreal:20140115T090000
TRANSP:OPAQUE
END:VEVENT
END:VCALENDAR
------=_=-_OpenGroupware_org_NGMime-29284-1389712264.533830-0--------
</Data>
</Body>
<ContentClass xmlns="Email:">urn:content-classes:message</ContentClass>
<Flag xmlns="Email:">
<FlagStatus>0</FlagStatus>
</Flag>
<NativeBodyType xmlns="AirSyncBase:">4</NativeBodyType>
</ApplicationData>
</Add>
</Commands>
</Collection>
<Collection>
<SyncKey>1390234625</SyncKey>
<CollectionId>vevent/personal</CollectionId>
<Status>1</Status>
<Commands>
<Add xmlns="AirSync:">
<ServerId xmlns="AirSync:">1358-52DD4C00-7-1C8F5920.ics</ServerId>
<ApplicationData xmlns="AirSync:">
<StartTime xmlns="Calendar:">20140120T130000Z</StartTime>
<EndTime xmlns="Calendar:">20140120T133000Z</EndTime>
<TimeZone xmlns="Calendar:">LAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACwGQsAAAABAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQFwMAAAACAAIAAAAAAAAAxP///w==</TimeZone>
<Organizer_Email xmlns="Calendar:"/>
<Organizer_Name xmlns="Calendar:"/>
<Subject xmlns="Calendar:">test meeting 1</Subject>
<UID xmlns="Calendar:">040000008200E00074C5B7101A82E0080000000050837F27D115CF01000000000000000010000000CDB129B5CE29804CB432AF17CBC48EB5</UID>
<Sensitivity xmlns="Calendar:">0</Sensitivity>
<BusyStatus xmlns="Calendar:">0</BusyStatus>
</ApplicationData>
</Add>
</Commands>
</Collection>
<Collection>
<SyncKey>1390234548</SyncKey>
<CollectionId>vcard/personal</CollectionId>
<Status>1</Status>
<Commands>
<Add xmlns="AirSync:">
<ServerId xmlns="AirSync:">1358-52DD4B80-5-1C8F5920.vcf</ServerId>
<ApplicationData xmlns="AirSync:">
<LastName xmlns="Contacts:">Brocoli</LastName>
<FirstName xmlns="Contacts:">Annie</FirstName>
</ApplicationData>
</Add>
</Commands>
</Collection>
<Collection>
<SyncKey>214-74</SyncKey>
<CollectionId>mail/Trash</CollectionId>
<Status>1</Status>
</Collection>
<Collection>
<SyncKey>104-118</SyncKey>
<CollectionId>mail/Sent</CollectionId>
<Status>1</Status>
</Collection>
<Collection>
<SyncKey>1390234625</SyncKey>
<CollectionId>vtodo/personal</CollectionId>
<Status>1</Status>
<Commands>
<Add xmlns="AirSync:">
<ServerId xmlns="AirSync:">1358-52DD4B00-1-1C8F5920.ics</ServerId>
<ApplicationData xmlns="AirSync:">
<Complete xmlns="Tasks:">0</Complete>
<DateCompleted xmlns="Tasks:">(null)</DateCompleted>
<Importance xmlns="Tasks:">1</Importance>
<ReminderSet xmlns="Tasks:">0</ReminderSet>
<Sensitivity xmlns="Tasks:">0</Sensitivity>
<Subject xmlns="Tasks:">test 2</Subject>
</ApplicationData>
</Add>
</Commands>
</Collection>
<Collection>
<SyncKey>1-1</SyncKey>
<CollectionId>mail/Aaaaappppp</CollectionId>
<Status>1</Status>
</Collection>
<Collection>
<SyncKey>1-1</SyncKey>
<CollectionId>mail/Shared Folders/bar</CollectionId>
<Status>1</Status>
</Collection>
</Collections>
</Sync>
As you can see, there are 2 mails, 1 event and 1 contact.
Can anyone tell me what could be wrong in our response which could lead Outlook 2013 to reject it?
Thanks,I enabled logging in Outlook 2010 and here is a the failure trying to synchronize one single mail:
- <eas>
<Url>https://sogoludo.inverse.ca/Microsoft-Server-ActiveSync?Cmd=Sync&User=sogo10&DeviceId=E820059D81C44570ADE521CE7B1E1494&DeviceType=WindowsOutlook15</Url>
<Method>POST</Method>
<Username>sogo10</Username>
- <request>
<headers>Accept-Encoding: gzip, deflate Content-Type: application/vnd.ms-sync.wbxml MS-ASProtocolVersion: 14.0 X-MS-WL: Outlook/1.0 X-TransactionID: {5B6DFE82-0F0F-4703-8647-81BD1E7E193B}</headers>
- <a0_Sync>
- <a0_Collections>
- <a0_Collection>
<a0_SyncKey>131-337</a0_SyncKey>
<a0_CollectionId>mail/INBOX</a0_CollectionId>
<a0_DeletesAsMoves>0</a0_DeletesAsMoves>
<a0_WindowSize>512</a0_WindowSize>
- <a0_Options>
<a0_FilterType>5</a0_FilterType>
<a0_MimeSupport>2</a0_MimeSupport>
<a0_MimeTruncation>8</a0_MimeTruncation>
- <a17_BodyPreference>
<a17_BodyType>4</a17_BodyType>
<a17_AllOrNone>1</a17_AllOrNone>
</a17_BodyPreference>
</a0_Options>
</a0_Collection>
- <a0_Collection>
<a0_SyncKey>1390353472</a0_SyncKey>
<a0_CollectionId>vevent/personal</a0_CollectionId>
<a0_DeletesAsMoves>0</a0_DeletesAsMoves>
<a0_WindowSize>512</a0_WindowSize>
- <a0_Options>
<a0_FilterType>0</a0_FilterType>
- <a17_BodyPreference>
<a17_BodyType>1</a17_BodyType>
<a17_AllOrNone>1</a17_AllOrNone>
</a17_BodyPreference>
</a0_Options>
</a0_Collection>
- <a0_Collection>
<a0_SyncKey>1390353298</a0_SyncKey>
<a0_CollectionId>vcard/personal</a0_CollectionId>
<a0_DeletesAsMoves>0</a0_DeletesAsMoves>
<a0_WindowSize>512</a0_WindowSize>
- <a0_Options>
<a0_FilterType>0</a0_FilterType>
- <a17_BodyPreference>
<a17_BodyType>1</a17_BodyType>
<a17_AllOrNone>1</a17_AllOrNone>
</a17_BodyPreference>
</a0_Options>
</a0_Collection>
- <a0_Collection>
<a0_SyncKey>222-86</a0_SyncKey>
<a0_CollectionId>mail/Trash</a0_CollectionId>
<a0_DeletesAsMoves>0</a0_DeletesAsMoves>
<a0_WindowSize>512</a0_WindowSize>
- <a0_Options>
<a0_FilterType>5</a0_FilterType>
<a0_MimeSupport>2</a0_MimeSupport>
<a0_MimeTruncation>8</a0_MimeTruncation>
- <a17_BodyPreference>
<a17_BodyType>4</a17_BodyType>
<a17_AllOrNone>1</a17_AllOrNone>
</a17_BodyPreference>
</a0_Options>
</a0_Collection>
- <a0_Collection>
<a0_SyncKey>106-122</a0_SyncKey>
<a0_CollectionId>mail/Sent</a0_CollectionId>
<a0_DeletesAsMoves>0</a0_DeletesAsMoves>
<a0_WindowSize>512</a0_WindowSize>
- <a0_Options>
<a0_FilterType>5</a0_FilterType>
<a0_MimeSupport>2</a0_MimeSupport>
<a0_MimeTruncation>8</a0_MimeTruncation>
- <a17_BodyPreference>
<a17_BodyType>4</a17_BodyType>
<a17_AllOrNone>1</a17_AllOrNone>
</a17_BodyPreference>
</a0_Options>
</a0_Collection>
- <a0_Collection>
<a0_SyncKey>1390353472</a0_SyncKey>
<a0_CollectionId>vtodo/personal</a0_CollectionId>
<a0_DeletesAsMoves>0</a0_DeletesAsMoves>
<a0_WindowSize>512</a0_WindowSize>
- <a0_Options>
<a0_FilterType>0</a0_FilterType>
- <a17_BodyPreference>
<a17_BodyType>1</a17_BodyType>
<a17_AllOrNone>1</a17_AllOrNone>
</a17_BodyPreference>
</a0_Options>
</a0_Collection>
</a0_Collections>
<a0_WindowSize>32</a0_WindowSize>
</a0_Sync>
</request>
- <response>
<headers>: HTTP/1.1 200 OK Connection: Keep-Alive Content-Length: 1192 Content-Type: application/vnd.ms-sync.wbxml Date: Wed, 22 Jan 2014 01:27:42 GMT Keep-Alive: timeout=5, max=60 MS-ASProtocolCommands: Sync,SendMail,SmartForward,SmartReply,GetAttachment,GetHierarchy,CreateCollection,DeleteCollection,MoveCollection,FolderSync,FolderCreate,FolderDelete,FolderUpdate,MoveItems,GetItemEstimate,MeetingResponse,Search,Settings,Ping,ItemOperations,Provision,ResolveRecipients,ValidateCert
MS-ASProtocolVersions: 2.0,2.1,2.5,12.0,12.1,14.0,14.1 MS-Server-ActiveSync: 14.0</headers>
- <a0_Sync>
- <a0_Collections>
- <a0_Collection>
<a0_Class>Email</a0_Class>
<a0_SyncKey>132-338</a0_SyncKey>
<a0_CollectionId>mail/INBOX</a0_CollectionId>
<a0_Status>1</a0_Status>
- <a0_Commands>
- <a0_Add>
<a0_ServerId>131</a0_ServerId>
- <a0_ApplicationData>
<a2_From>[email protected]</a2_From>
<a2_To>[email protected]</a2_To>
<a2_Subject>test plain text</a2_Subject>
<a2_DateReceived>20140122T012742Z</a2_DateReceived>
<a2_Importance>1</a2_Importance>
<a2_Read>0</a2_Read>
<a2_MessageClass>IPM.Note</a2_MessageClass>
<a2_InternetCPID>65001</a2_InternetCPID>
- <a17_Body>
<a17_BodyType>4</a17_BodyType>
<a17_EstimatedDataSize>770</a17_EstimatedDataSize>
<a17_Truncated>0</a17_Truncated>
<a17_Data>Return-Path: <[email protected]> Received: from sogo.example.com (localhost [127.0.0.1]) by sogo (Cyrus v2.4.12-Debian-2.4.12-2) with LMTPA; Tue, 21 Jan 2014 20:27:42 -0500 X-Sieve: CMU Sieve 2.4 Received: from localhost (localhost
[127.0.0.1]) by sogo.example.com (Postfix) with ESMTP id 596562808E3 for <[email protected]>; Tue, 21 Jan 2014 20:27:42 -0500 (EST) User-Agent: SOGoMail 2.1.2 X-Forward: 172.21.0.10 MIME-Version: 1.0 from: "Wolfgang Fritz" <[email protected]>
subject: test plain text message-id: <7240-52df1e80-3-34827b00@260596697> to: "sogo10" <[email protected]> content-type: text/plain; charset="utf-8" date: Tue, 21 Jan 2014 20:27:42 -0500 content-transfer-encoding: 7bit test 1</a17_Data>
</a17_Body>
<a2_ContentClass>urn:content-classes:message</a2_ContentClass>
- <a2_Flag>
<a2_FlagStatus>0</a2_FlagStatus>
</a2_Flag>
<a17_NativeBodyType>4</a17_NativeBodyType>
</a0_ApplicationData>
</a0_Add>
</a0_Commands>
</a0_Collection>
- <a0_Collection>
<a0_Class>Calendar</a0_Class>
<a0_SyncKey>1390353472</a0_SyncKey>
<a0_CollectionId>vevent/personal</a0_CollectionId>
<a0_Status>1</a0_Status>
</a0_Collection>
- <a0_Collection>
<a0_Class>Contacts</a0_Class>
<a0_SyncKey>1390353298</a0_SyncKey>
<a0_CollectionId>vcard/personal</a0_CollectionId>
<a0_Status>1</a0_Status>
</a0_Collection>
- <a0_Collection>
<a0_Class>Email</a0_Class>
<a0_SyncKey>222-86</a0_SyncKey>
<a0_CollectionId>mail/Trash</a0_CollectionId>
<a0_Status>1</a0_Status>
</a0_Collection>
- <a0_Collection>
<a0_Class>Email</a0_Class>
<a0_SyncKey>106-122</a0_SyncKey>
<a0_CollectionId>mail/Sent</a0_CollectionId>
<a0_Status>1</a0_Status>
</a0_Collection>
- <a0_Collection>
<a0_Class>Tasks</a0_Class>
<a0_SyncKey>1390353472</a0_SyncKey>
<a0_CollectionId>vtodo/personal</a0_CollectionId>
<a0_Status>1</a0_Status>
</a0_Collection>
</a0_Collections>
</a0_Sync>
</response>
</eas> -
Exporting data from table to Excel in a particular format using BSP.
Hello all,
I am creating a application in BSP wherein i have to export data to excel sheet.
I am able to do that but the output in excel sheet is not formatted. it is displaying the data in a single
column. For example, the internal table which i am exporting to excel contains fields "product
name", "area name", country name", "values". all these should be displayed in different columns.How
can i achieve this functionality.A sample code will be of great help..
Below is the code i hav written for exporting to excel :
data: l_len type i,
l_string type string,
app_type type string,
file_content type xstring,
file_mime_type type string.
create OBJECT cached_response TYPE cl_http_response EXPORTING add_c_msg = 1.
cached_response->set_data( file_content ).
cached_response->set_header_field(
name = if_http_header_fields=>content_type
value = file_mime_type ).
LOOP AT itab_xls INTO wa_xls.
CONCATENATE L_STRING wa_xls-product_name
wa_xls-area_name
wa_xls-landx
CL_ABAP_CHAR_UTILITIES=>CR_LF INTO L_STRING SEPARATED BY SPACE.
ENDLOOP.
APP_TYPE = 'APPLICATION/MSEXCEL; charset=utf-16le'.
data: l_xstring type xstring.
call function 'SCMS_STRING_TO_XSTRING'
exporting
text = l_string
MIMETYPE = 'APPLICATION/MSEXCEL; charset=utf-16le'
IMPORTING
BUFFER = l_xstring.
Add the Byte Order Mark - UTF-16 Little Endian
concatenate cl_abap_char_utilities=>byte_order_mark_little
l_xstring
into l_xstring in byte mode.
cached_response->set_data( l_xstring ).
cached_response->set_header_field( name = if_http_header_fields=>content_type
value = 'APPLICATION/MSEXCEL; charset=utf-16le' ).
*Set the filename into the response header
cached_response->set_header_field( name = 'Content-Disposition'
value = 'attachment; filename=gkb_excel.xls' ).
*Set the Response Status
cached_response->set_status( code = 200 reason = 'OK' ).
*Set the Cache Timeout - 60 seconds - we only need this in the cache
*long enough to build the page and allow the IFrame on the Client to request it.
cached_response->server_cache_expire_rel( expires_rel = 60 ).
CALL FUNCTION 'GUID_CREATE'
IMPORTING
ev_guid_32 = guid.
CONCATENATE runtime->application_url '/' guid '.xls' INTO url.
cl_http_server=>server_cache_upload( url = url
response = cached_response ).
Can anyone help me with some solution.
Thanks in advance.
Gurmahima.the issue is here
LOOP AT itab_xls INTO wa_xls.
CONCATENATE L_STRING wa_xls-product_name
wa_xls-area_name
wa_xls-landx
CL_ABAP_CHAR_UTILITIES=>CR_LF INTO L_STRING SEPARATED BY SPACE.
ENDLOOP.
instead do the following
LOOP AT itab_xls INTO wa_xls.
CONCATENATE L_STRING wa_xls-product_name ','
wa_xls-area_name ','
wa_xls-landx ','
CL_ABAP_CHAR_UTILITIES=>CR_LF INTO L_STRING .
ENDLOOP.
and then change the file name extension from xls to csv. it should open properly in excel.
Note that this is only excel csv file. if you want a proper excel excel file, then
option one: build a html table with your data into a string and pass it to excel
option 2: build excel xml using your data into a string and pass it to excel.
Regards
Raja -
Reading Unicode data from a file...
I am writing an application that needs to read some configuration data from a file. An end user edits the configuration file to provide the configuration data. The Java code reads this file and uses the configuration data supplied by the user.
The user can also save non-ascii characters as part of the configuration data. hence, I do not want to use java properties files. What are the other options available that allow me reading Unicode data into my Java code and will also allow user to save the configuration file as Unicode?Java characters are Unicode characters. Read file data that consists of Unicode characters as Java characters or strings.
You can read the data as primitive char values using the DataInputStream class. The InputStreamReader class can also read Unicode (UTF-16) data.
Data can be written using the OutputStreamWriter class. -
Hi,
I have read this weblog
/people/patrick.baer/blog/2005/02/24/abap-serialization--part-i-quick-n-easy and tried to serialize ABAP data into XML format.
In fact, I have copied the exact code from this weblog, but somehow this file is not visible in my pc.
DATA example_data TYPE spfli.
select single * from spfli into example_data.
DATA xml_utils TYPE REF TO if_ixml.
xml_utils = cl_ixml=>create( ).
DATA xml_stream_factory TYPE REF TO if_ixml_stream_factory.
xml_stream_factory = xml_utils->create_stream_factory( ).
DATA xml_output_stream TYPE REF TO if_ixml_ostream.
xml_output_stream = xml_stream_factory->create_ostream_uri( system_id =
'file://c:test.xml' ).
try.
CALL TRANSFORMATION id
SOURCE data_node = example_data
RESULT XML xml_output_stream.
catch cx_sy_conversion_base64 CX_SY_CONV_ILLEGAL_DATE_TIME.
write 'there is an exception'.
endtry.
This part of the code, I have also changed to :
xml_stream_factory->create_ostream_uri( system_id =
'file://test.xml' ).
and still the file is not visible.
I presume three reasons:
a) Looking in the wrong place
b) Some configuration, I am not doing properly
c) Something else has to be done, to write a file to system
Any help on this regard, is highly appreciated.
Next issue being, how robust is the approach of serializing ABAP data into XML format, so that a third party system can pick up this data and do a comparison ?
Some parameters that I am looking for in this regards are:
a) Error Validation (can XML data be incorrectly written into a file/while transmitting this data some errors can creep in. If so, how do I rectify it. As far as I know, this data can only be written to Presentation Server or using FTP ,transported to required destination. Is there any other approach ? )
b) Security
Would be great if you could drop some hints for the above procedure.
Regards,
Subramanian V.I think you are perhaps overestimating the capabilities of the osteam object. If you want to write the XML to a file the easiest thing to do is render it an ostream_itable (internal ABAP table). Then you can download it your PC with the GUI_DOWNLOAD function:
parameter: ifile type file_table-filename obligatory
default 'c:issue.xml'.
****Temp File name for function module call.
data: ifilename type string.
move ifile to ifilename.
create object issue
exporting
id = id
create_mode = abap_false.
data: g_ixml type ref to if_ixml,
g_stream_factory type ref to if_ixml_stream_factory,
xslt_err type ref to cx_xslt_exception,
g_encoding type ref to if_ixml_encoding,
ostream type ref to if_ixml_ostream.
constants: line_length type i value 4096.
types: line_t(line_length) type x,
table_t type standard table of line_t.
data: restab type table_t.
constants:
* encoding for download of XML files
encoding type string value 'utf-8'.
data: ressize type i.
try.
g_ixml = cl_ixml=>create( ).
g_stream_factory = g_ixml->create_stream_factory( ).
g_encoding = g_ixml->create_encoding( character_set = encoding
byte_order = 0 ).
refresh restab.
ostream =
g_stream_factory->create_ostream_itable( table = restab ).
ostream->set_encoding( encoding = g_encoding ).
call transformation id_indent
source asap_issue = issue
result xml restab
options
data_refs = 'embedded'.
ressize = ostream->get_num_written_raw( ).
catch cx_xslt_exception into xslt_err.
data: s type string.
s = xslt_err->get_text( ).
endtry.
call function 'GUI_DOWNLOAD'
exporting
bin_filesize = ressize
filename = ifilename
filetype = 'BIN'
tables
data_tab = restab
exceptions
others = 1.
call method cl_gui_frontend_services=>execute
exporting
document = ifilename
* APPLICATION =
* PARAMETER =
* DEFAULT_DIRECTORY =
* MAXIMIZED =
* MINIMIZED =
* SYNCHRONOUS =
exceptions
cntl_error = 1
error_no_gui = 2
bad_parameter = 3
file_not_found = 4
path_not_found = 5
file_extension_unknown = 6
error_execute_failed = 7
others = 8.
As far as a different system, once you have the data serialized into a string or internal table you have lots of possibilites. If the other system is an SAP system you could send the data via RFC. You could always write the XML string to the server file system (via open dataset, transfer to dataset). You can then FTP the file (using built in SAP FTP functionality) just about anywhere.
What are you looking for as far as robust and secure. The XML serializer is built in the ABAP Kernel and quite robust. As far as secure- the data isn't secure at all. The data is written into a simple string (if written into the file system or your pc - it is a text or binary file that can easily be read by just about anything). Serializing to XML in and of itself isn't going to provide any security. -
Encoding non english characters with utf 8 on jsp (Critical!!)
I am inserting hebrew characters from JSP into oracle db and everything is fine until this point. But when I try to retrieve the information from the database, the characters are not displayed properly (I get some garbage characters). I am sure that the data stored in the database is correct, but not sure why there is a problem in displaying the data in the JSP.
I came across a thread on TSS
http://www.theserverside.com/discussions/thread.tss?thread_id=28944
and followed the suggestions given there like having
<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">and also this
<%
//Some JDBC and sql statement query UTF-8 data and then ...
String str = rs.getString("utf8_data");
str = new String(str.getBytes("ISO-8859-1"),"UTF-8");
%>
<%= str %>Now, the data getting displayed is partly correct, I mean to say, some characters are still coming as squares.
Any ideas will be of great help.even i doubt the database charset for this issue. But what I dont understand is how only certain hebrew characters are getting stored properly and why others are corrupted?
Also, can anyone let me know how i can view the Non-English characters present in the database directly, as TOAD is not able to display them -
Encoding conversion from UTF-16 to UTF-8
Hi all
I have a simple java String which is in UTF-16 format. I have to convert it to UTF-8 format coz my application expects UTF-8 only.
Can any body tell me what should i do for this???
thanksbut isn't it true that java supports only UTF-16 strings.
When i create the new String by using a UTF-8 byte array , what i feel is, it'll again convert it to UTF-16 data.
Suppose i have a String s1="dd" in UTF-16 format.
i have another one s2="ddd" in UTF-8 format
if i perform s1+s2 operation , how will JVL come to nkow about the encoding value for both strings??how will it perform the operation??
plz respond back and clear my doubt........
Maybe you are looking for
-
Issue in Step 12-Maintain User Assignment in Portal (RSPOR_SETUP)
Hi, I had issue with step 12--Maintain User Assignment in Portal when running prog RSPOR_SETUP [to setup BEx Web configuration] with error " System failure during call of function module RSWR_RFC_SERVICE_TEST". Note: BI certificate was already export
-
Measuring Point during IK01 not allowing characteristics with CHAR type
Hi Experts, Measuring Point during IK01 not allowing characteristics with CHAR type Only allows NUM, could you anyone suggest on this. Regards Nitin
-
Dear experts, I am using OLE to automate data into Excel chart. My problem now is i would like to change the font size in chart area at X and Y axis. What method and property should i use in order to change the size of the font in chart area? Thanks
-
Guide to write own TMF analysis module.
Hi, I was collecting lttng trance point in my system to debug performance. But now I see eclipse don't help me much to visualise traces. So I want to write my own analysier which will analyse data and presnt in histogram. I went trhough TMF developer
-
Hi There, Our Production client has got two controlling areas, and our requirement is, users relating to controlling area 1 should not be able to view the names of the cost centers in possible entries box (search box). Currently we managed to restric