Problem with Encoding of ASCII-Manager Exports

Discussions about product bugs & problems!
Note: This is no replacement for the Official ETM Support!
2 posts • Page 1 of 1
fandersen
Posts:51
Joined: Tue Aug 26, 2014 12:39 pm

Problem with Encoding of ASCII-Manager Exports

Post by fandersen »

Hello,

I am currently working on a multi-language project (PVSS 3.9) and I have to add new DPs. My plan is to export existing DPs and replace the name of the DP, adapt IEC-Addresses and Aliases/Comments. Then I just want to import the file back to PVSS. To automate things, I am writing a little program in VB.NET. Now here is my problem:

First, my program read the dpl-file with UTF8 (no BOM). But then I noticed that cyrillic characters are not displayed correctly and looked like this:
LANG:27 "????? ?????????????? ????????"

When I open the dpl file with Notepad++ with UTF8 (no BOM) I can read the text:
LANG:27 "????? ?????????? ????????"

With Notepad++ I noticed that german umlauts were not displayed properly.

That brought me to the idea that the dpl file contains different encoding for each locale:
- german: ISO-8859-2
- cyrillic: ISO-8859-5
...

I tested it with Notepad++ and VB.NET and it seems confirmed.

I know that UTF-8 needs more memory for languages that use non-latin characters. But this a really complex solution because now I need to disect the file properly. Or did I miss something?

leoknipp
Posts:2928
Joined: Tue Aug 24, 2010 7:28 pm

Re: Problem with Encoding of ASCII-Manager Exports

Post by leoknipp »

Hello,

when using PVSS 3.9 you cannot use UTF8 encodings as they are not supported by this version of WinCC OA / PVSS.
The used languages and encodings in your project you can find in the config-file at the langs-entries.

As far as I know an ASCII-file can only have one encoding. When exporting data with the ASCII-manager you get a text/ASCII file.
Normally ASCII files are edited with a text editor.

At my tests editing a file with german and russian textes was possible with the following procedure:
-- created an ASCII-file
-- opened the file with Notepad++ with encoding ANSI
-- choosing the character set "West european" --> "ISO 8859-1"
-- editing the german information
-- choosing the character set "Cyrillic" --> "ISO 8859-5"
-- editing the russian information
-- saving the file
-- importing the file with the ASCII-manager

How you can create a file with the correct information automatically I do not know.

To simplify your procedure to create new datapoints you could import an ASCII file without language dependent information (comments, alert textes) or only with textes in one language.
Afterwards you create a file with the procedure given above where only the language information is saved.

Another possibility would be to write a CTRL-script which
-- reads a file with the information for new datapoints
-- creates new datapoints using dpCreate or dpCopy
-- writes the modified information to the datapoints
-- for language dependent information you can maybe use then different files where editing might be easier without changing the character set all the time

If you are using master-datapoints you can use ASCII-file in V3/V4 format where only those conifgs + attributes need to be defined which are different to the master datapoint.

Please check if you can use one of these possibilities.

Best Regards
Leopold Knipp
Senior Support Specialist

2 posts • Page 1 of 1