Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Character conversion error from encoding UTF-8 #1111

Closed
clement-brodu opened this issue Feb 16, 2024 · 4 comments
Closed

Character conversion error from encoding UTF-8 #1111

clement-brodu opened this issue Feb 16, 2024 · 4 comments

Comments

@clement-brodu
Copy link
Contributor

clement-brodu commented Feb 16, 2024

Hello,

With last 2.25.0 version, in Openedge 11.7.14 we have those problems :

Character conversion error in S:\Somewhere\toto-api.i at line 196 column 127 from encoding UTF-8
Character conversion error in S:\Somewhere\titi.i at line 2 column 21 from encoding UTF-8

image

Our Sonarlint plugins are up to date.

All our sources are in windows-1252/Cp1252.

We have the problem on *.w files, but it seems to be OK in other extensions *.cls and *.p

We don't have the problem in Openedge 12

Trigger: EDITOR_CHANGE
Clear markers on 0 excluded files
SonarLint processing file /archi-erp/Src/copylig_ph.w...
Language on L/archi-erp/Src/copylig_ph.w
Entering canConfigure...
useXrefXML: false
sonar.sources set to 'D:\Openedge\workspace-oe11\archi-erp\Src'
sonar.oe.propath set to 'D:\Openedge\workspace-oe11\archi-erp\Src,D:\Openedge\workspace-oe11\archi
/********************************/
No PL cache overwrite
Project has DB connections, looking for file D:\Openedge\workspace-oe11\archi-erp\.sonarlint\dblist.txt
Reading dblist.txt
Connected mode (using configuration of 'archi-erp' in connection 'sonarqubepgs.proginov.eu')
Starting analysis with configuration:
[
  projectKey: archi-erp
  baseDir: D:\Openedge\workspace-oe11\archi-erp
  extraProperties: {sonar.sourceEncoding=Cp1252, sonar.oe.propath=D:\Openedge\workspace-oe11\archi-
/***************************************************************/
sonar.oe.binaries=D:/Openedge/workspace-oe11/archi-erp/Obj, sonar.sources=D:\Openedge\workspace-oe11\archi-erp\Src, sonar.oe.lint.pl.cache=D:\Openedge\workspace-oe11\archi-erp\.sonarlint\pl.txt, sonar.oe.aliases=*******************************
sonar.oe.lint.databases=****************************************}
  moduleKey: null
  inputFiles: [
    file:/D:/Openedge/workspace-oe11/archi-erp/Src/copylig_ph.w (UTF-8) [oe]
  ]
]



@gquerret
Copy link
Contributor

Since 2.25, encoding is now provided directly by Developer Studio, so you should check that this specific file has the right encoding. Right-click on the file, then properties:
image

The error with Optional.isEmpty will be fixed (Java 8 again...)

@clement-brodu
Copy link
Contributor Author

Encoding of my file is OK :

image

But, includes files are outside of the workspace (but in my propath).

Project : D:\workspace-oe11\project1\Src\myProg.w
Propath : D:\workspace-oe11\project1\Src,S:\Commun\Includes
the include file : S:\Commun\Includes\toto.i

/*------------------------------------------------------------------------
    File        : toto.p

  ----------------------------------------------------------------------*/
BLOCK-LEVEL ON ERROR UNDO, THROW.
*************************  Main Block  *************************** */
{toto.i}

MESSAGE "Hello"  VIEW-AS ALERT-BOX INFORMATION BUTTONS OK IN WINDOW CURRENT-WINDOW.

@gquerret
Copy link
Contributor

I confirm that the encoding is not passed correctly by Eclipse to the analyzer, it's always using utf-8 in my env, but it's probably the platform default encoding. I'll investigate this problem.

@gquerret
Copy link
Contributor

Issue has been fixed. CABL 2.25.1 will be released later today, along with the new versions of the Eclipse plugin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants