You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by "Junichi Yamamoto (Jira)" <ji...@apache.org> on 2019/10/23 05:16:00 UTC

[jira] [Commented] (NETBEANS-3102) Wrong encoding for files in include path

    [ https://issues.apache.org/jira/browse/NETBEANS-3102?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16957559#comment-16957559 ] 

Junichi Yamamoto commented on NETBEANS-3102:
--------------------------------------------

Could you please attach an example php project as zip file to reproduce it?

BTW, can you reproduce it with other extension files(e.g. xxx.java, xxx.txt, ...)?

> Wrong encoding for files in include path
> ----------------------------------------
>
>                 Key: NETBEANS-3102
>                 URL: https://issues.apache.org/jira/browse/NETBEANS-3102
>             Project: NetBeans
>          Issue Type: Bug
>          Components: php - Editor
>    Affects Versions: 11.0
>         Environment: Windows 7, Java 8 update 211, NetBeans 11.0
>            Reporter: Gonçalo Peres
>            Priority: Major
>
> I've a PHP Project with a bunch of PHP files on a directory "D:/www/project_php" with Encoding in UTF-8 and PHP Version 7.3.4 .
> I add a directory (D:/www/include_path) with some other PHP files to the include path. These files are in UTF-8 enconding, but show in the Netbeans Editor as ANSI with all the accentuated characters with encoding errors.
> {code:java}
> return array('status'=>0, 'http_code'=>$httpCode, 'msg'=>"Erro: não foi possível obter o código fonte da página.\n", 'html'=>$html);{code}
> {{it should be:}}
> {code:java}
> return array('status'=>0, 'http_code'=>$httpCode, 'msg'=>"Erro: não foi possível obter o código fonte da página.\n", 'html'=>$html);{code}
> Tested this by opening a file on the include path in Notepad++ and converting it to ANSI, it then shows OK on the Netbeans Editor, withou garbage characters, confirming that although the project is in UTF-8 and all files in the project directory are rendered in UTF-8, the Netbeans Editor show the files on the include path as ANSI.
> h4. Workaround:
> Navigate to {{<Netbeans installation directory>/etc}} and open the {{netbeans.conf}} file. Add " {{-J-Dfile.encoding=UTF-8}}" at the end of the line that starts with {{netbeans_default_options}} (make sure to include the leading space). Restart Netbeans and it should be in UTF-8.
> Anyway, files on the included path of a project should be opened by Netbeans using the same encoding as the project settings.
> Please correct this. Thank you!



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@netbeans.apache.org
For additional commands, e-mail: commits-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists