Hi,
anyone found solution for this problem?
I have set to UTF-8, alphanumerics are shown with wrong encoding.
#encodingvariablesvieweclipse
Hi,
anyone found solution for this problem?
I have set to UTF-8, alphanumerics are shown with wrong encoding.
Hi,
anyone found solution for this problem?
I have set to UTF-8, alphanumerics are shown with wrong encoding.
Where exactly are you setting the character set encoding to UTF-8, under Project Properties, etc.?
When I set the encoding under the project properties to UTF-8, I do not see the same problem that you are experiencing.
Under which OS are you running?
Thanks.
Hi,
anyone found solution for this problem?
I have set to UTF-8, alphanumerics are shown with wrong encoding.
Im running Windows XP. DOS cp is 850. I've tried with several encodings(utf8, cp1252, iso-8..) in Project->Resources, and also in Eclipse->Workspace settings, since Project->encoding is inherited.
Hi,
anyone found solution for this problem?
I have set to UTF-8, alphanumerics are shown with wrong encoding.
I've also tried setting cp850 and UTF-8 and also don't see the same issue. Having said that, I'm using Widnows 7 and not XP.
Just to clarify matters, what product version are you using?
I also assume that you're on a German localised machine (not that it should make a difference, but it's good to be sure)
Regards
Hi,
anyone found solution for this problem?
I have set to UTF-8, alphanumerics are shown with wrong encoding.
A couple of questions for you...
Is the data in these variables being read from a file?
If yes, then what character set is being used in the file?
Are you specifying the directive CHARSET"EBCDIC"?
Does this occur when debugging one of the example programs or only when debugging one of your projects?
Thanks.
Hi,
anyone found solution for this problem?
I have set to UTF-8, alphanumerics are shown with wrong encoding.
Hi Chris,
yes, machine is localised for German, and product is Visual COBOL for Eclipse, Version: 2.1.75.v201209140610.
Hi,
anyone found solution for this problem?
I have set to UTF-8, alphanumerics are shown with wrong encoding.
Chris,
file is ANSI, as shown when opened with Notepad .
I havn't tried with example project(s).
Hi,
anyone found solution for this problem?
I have set to UTF-8, alphanumerics are shown with wrong encoding.
Chris,
file is ANSI, as shown when opened with Notepad .
I havn't tried with example project(s).
Hi,
anyone found solution for this problem?
I have set to UTF-8, alphanumerics are shown with wrong encoding.
Attached is input file, original extension is .dat
Hi,
anyone found solution for this problem?
I have set to UTF-8, alphanumerics are shown with wrong encoding.
Attached is input file, original extension is .dat
Hi,
anyone found solution for this problem?
I have set to UTF-8, alphanumerics are shown with wrong encoding.
I created a demo project and I can read your file and the variables window looks correct using the default charset for the system.
I think that this is either related to your environment or is something specific in your project.
Can you please create a new project and use the following source to test this with?
Change the filename in the select statement to match you own location.
program-id. testenv as "testenv".
environment division.
input-output section.
select test-file assign to "c:\\temp\\testfile.dat"
organization is line sequential
file status is file-status.
data division.
fd test-file.
01 test-record pic x(80).
working-storage section.
01 file-status pic x(2) value spaces.
01 my-field pic x(80).
procedure division.
open input test-file
display file-status
read test-file
move test-record to my-field
display my-field
close test-file
goback.
end program testenv.
Hi,
anyone found solution for this problem?
I have set to UTF-8, alphanumerics are shown with wrong encoding.
A colleague of mine found that if he changes the file type from line sequential and adds the charset"ebcdic" directive to my test program then the results are the same as what you are experiencing.
This is because files of type line sequential are automatically converted whereas sequential files are not.
If you are setting charset"ebcdic" directive then the files are assumed to be in ebcdic encoding and not ansi.
I can get this to read correctly by adding the code-set clause to the files fd and assign it to the ASCII alphabet:
Example:
$set charset"ebcdic"
program-id. testenv as "testenv".
environment division.
configuration section.
special-names.
alphabet ascii-sequence is ASCII.
input-output section.
select test-file assign to "c:\\temp\\testfile.dat"
organization is sequential
file status is file-status.
data division.
fd test-file
code-set is ascii-sequence.
01 test-record pic x(80).
working-storage section.
01 file-status pic x(2) value spaces.
01 my-field pic x(80).
procedure division.
open input test-file
display file-status
read test-file
move test-record to my-field
display my-field
close test-file
goback.
end program testenv.
Hi,
anyone found solution for this problem?
I have set to UTF-8, alphanumerics are shown with wrong encoding.
Chris,
thanks for tip.
I find hard to make changes in source of the programms(minimum two lines - per program per FD) just in order to compile&run, is there silverbullet?
Our additional settings are : DIALECT(ENTCOBOL) INITCALL"ORASQL8" ASSIGN "EXTERNAL" nowarning copyext",cpy" hostarithmetic PERFORM-TYPE"OSVS" signfixup IDXFORMAT(8) nolist p(cobsql) CSQLT=ORACLE8 MAKESYN VERBOSE KEEPCBL END-C COMP5=NO p(cp) ENDP ENDP
Thanks,
Alex
Hi,
anyone found solution for this problem?
I have set to UTF-8, alphanumerics are shown with wrong encoding.
I am not sure what you are asking for here.
You can set these directives at the project level by right clicking on the project name and selecting properties:
Or you could place the directives in a directives file, i.e. cobol.dir and then specify the use directive to point to this file:
use"c:\\mydirtectives\\cobol.dir"
Is this what you are looking for?
Hi,
anyone found solution for this problem?
I have set to UTF-8, alphanumerics are shown with wrong encoding.
Chris,
i just wanted to pass info. additional settings are allready in right place(cobol.dir in express, project settings in eclipse as shown in image you sent).
What we need is to avoid adding lines(alphabet&code-set) in current code, because we have hundreds, close to thousend, of programs.
I was hoping proper encoding can be set at eclipse/project level...
Thanks,
Alex
Hi,
anyone found solution for this problem?
I have set to UTF-8, alphanumerics are shown with wrong encoding.
Chris,
i just wanted to pass info. additional settings are allready in right place(cobol.dir in express, project settings in eclipse as shown in image you sent).
What we need is to avoid adding lines(alphabet&code-set) in current code, because we have hundreds, close to thousend, of programs.
I was hoping proper encoding can be set at eclipse/project level...
Thanks,
Alex
Hi,
anyone found solution for this problem?
I have set to UTF-8, alphanumerics are shown with wrong encoding.
The problem here is that you are setting the DIALECT"ENTCOBOL" on which also turns on CHARSET"EBCDIC" and you are trying to read an ANSI file.
Did this use to work in a previous version of COBOL?
If these sequential files are actually line sequential files with CRLF separating the records then you could try setting the compiler directive SEQUENTIAL"LINE" as then the compiler will treat files specified with ORGANIZATION SEQUENTIAL as if ORGANIZATION IS LINE SEQUENTIAL were specified.
Files specified as LINE SEQUENTIAL will be treated as ANSI files by default.
Thanks.
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.