camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stefan Mandel (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CAMEL-8346) JsonPathEngine skips file encoding
Date Fri, 27 Feb 2015 20:38:04 GMT

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

Stefan Mandel commented on CAMEL-8346:
--------------------------------------

My workspace (forked on github) does not fail. I tried it on two independent windows systems.

Have you applied the patch CAMEL-8356? It has not yet been closed or commented. The error
you describe occurs if CAMEL-8356 is not applied (it blocks this issue).

Other possible reasons:

The patch is based on (2.15-SNAPSHOT). 2.14 is a bit buggier because the used json path lib
version is buggy. I think I can propose a patch for 2.14 too, but it would probably not be
the same patch.

I tried to create a patch on my local windows system. The process charset-encoding + git ->
create patch -> apply patch produces corrupt files. This lead to multiple unit test errors
on my machine, but maybe linux or mac-os behave in other ways. In this case download the attached
json files and overwrite the existing ones in your workspace.

> JsonPathEngine skips file encoding
> ----------------------------------
>
>                 Key: CAMEL-8346
>                 URL: https://issues.apache.org/jira/browse/CAMEL-8346
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-jsonpath
>    Affects Versions: 2.14.1, 2.15.0
>            Reporter: Stefan Mandel
>             Fix For: 2.14.2, 2.15.0
>
>         Attachments: JsonPathSourceTest.java, germanbooks-iso-8859-1.json, germanbooks-utf8.json
>
>
> This occurs if one uses the camel file component with a charset parameter, e.g. file:/url?charset=UTF-8.
It leads to strange effects:
> # testing the same utf8-file under linux (default encoding:UTF-8) and german windows
(default encoding:windows-1252) leads to problems with german umlauts.
> # using a file in another encoding than the default (ISO-8859-1 on linux) leads also
to problems with german umlauts.
> - Both problems can be reproduced with the attached unit test files in 2.14.1.
> - Problem 1 is hidden in 2.15-SNAPSHOT, because UTF-8 is hard-coded as file encoding
(maybe ok, since JSON is almost never used with language specific encondings), Problem 2 also
occurs in 2.15-SNAPSHOT
> I can provide or help with a fix (or pull request), if these problems are classified
as true defects.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message