cancel
Showing results for 
Search instead for 
Did you mean: 

IDoc to File - Russian Characters not in UTF-8 format - File Receiver

Former Member
0 Kudos

Hello,

My scenario is Idoc to File. My SAP sender system is a Unicode system and my RFC connection to XI is also set to a unicode connection. My idoc is sent to XI OK and whenever I look at the payload in SXMB_MONI, I see the Russian characters OK, but the problem is when the file gets created.

My receiver system wants the file in UTF-8 format. When the file gets created, the Russian characters are not in UTF-8 encoding format. For example, the Russian chars look like (but without the spaces inbetween): Ð # Ð µ Ñ # Ð ¶ Ð ° Ñ # Ð µ Ð » Ñ ...

Instead, the chars should look like: Держатель

My file type in my file receiver comm channel is binary and I am also using the AF_Modules/XMLAnonymizerBean with anonymizer.encoding of utf-8.

Can someone please help me determine the problem?

Thank you,

Rhonda

Accepted Solutions (0)

Answers (2)

Answers (2)

stefan_grube
Active Contributor
0 Kudos

When the file gets created, the Russian characters are not in UTF-8 encoding format. For example, the Russian chars look like (but without the spaces inbetween): Ð # Ð µ Ñ # Ð ¶ Ð ° Ñ # Ð µ Ð » Ñ ...

I suppose that your file is correct UTF-8, but your editor does not display it as UTF-8 characters, but as ISO characters.

Open the file with Internet Exploerer or Word and set the settings to UTF-8.

Former Member
0 Kudos

In File adapter select the correct encoding std check on google which encoding std used for russian char.

Select file type as text and put the correct encoding std.

chirag

Former Member
0 Kudos

Hello,

Yes, I actually tried this already and it didn't work.

I also noticed the following in the SAP help document on receiver file adapter which have included below. My file is an XML document. Do you have any other ideas? Thank you.

-


Specify the File Type of the document.

○ Binary

○ Text

Under File Encoding, specify a code page.

The default setting is to use the system code page that is specific to the configuration of the installed operating system. The content of the message is then converted to the corresponding code page before the message is saved as a file.

You should use this conversion only for plain text and not for XML documents. If you want to change the encoding of an XML document, then select the File Type as Binary and apply XMLAnonymizerBean as an additional module in the Module tab page.

Former Member
0 Kudos

Hi Rhonda,

Hope you have set the following for your file receiver adapter :

1. Transfer Mode is set to Binary,

2. File Type Text,

3. Encoding ISO-8859-1( for Western European Latin ).

Inorder to recognize russian Character, try as follows :

Your sender idoc after coming into Pi has XML encoding declaration 'UTF-8'.

Write a simple XSLT mapping to change the value of the attribute "encoding" to "ISO-8859-1" in the output XML of message mapping . Include this XSLT map as the second mapping step in your interface mapping.

First step in your interface mapping will be your already existing message mapping.

An example of the XSL code :

<?xml version='1.0'?>

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:output method='xml' encoding='ISO-8859-1' />

<xsl:template match="/">

<xsl:copy-of select="*" />

</xsl:template>

</xsl:stylesheet>

Iam not sure whether Russian language encoding has ISO-8859-2 (Eastern European Latin) or

ISO-8859-1( for Western European Latin )...pls check out !

or you can also do java mapping instead of above mentioned xslt mapping if you are comfortable with java code !

Cheers,

Ram.