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

unmappable character for encoding Cp1252 even if project.build.sourceEncoding is set to UTF-8 #2

Closed
gslowikowski opened this Issue Oct 19, 2015 · 9 comments

Comments

Projects
None yet
2 participants
@gslowikowski
Copy link
Contributor

gslowikowski commented Oct 19, 2015

Originally reported on Google Code with ID 2

What steps will reproduce the problem?
1. We need to execute "mvn  install" command from the root directory of the attache
play project


What is the expected output? What do you see instead?

We should get the output jar of the project installed in the local repository.

Instead we are getting the following  error messages

[INFO] Compiling 4 Scala sources and 2 Java sources to D:\projects\play-framework\myApplications\nonASCII\target\classes...
[ERROR] D:\projects\play-framework\myApplications\nonASCII\app\controllers\Application.java:9:
error: unmappable character for encoding Cp1252
[ERROR]    private static final String errorMsg = "message : τÖ╗Θî▓π?½σñ▒µòùπ?ùπ?╛π?ùπ?ƒπÇé";
[ERROR]                                                             ^

What version of the product are you using? On what operating system?

play2.plugin.version : 1.0.0-alpha1
D:\projects\play-framework\myApplications\nonASCII>mvn -v
Apache Maven 3.0.4 (r1232337; 2012-01-17 14:14:56+0530)

Java version: 1.7.0_04, vendor: Oracle Corporation

Default locale: en_IN, platform encoding: Cp1252

OS name: "windows 7", version: "6.1", arch: "amd64", family: "windows"

Please provide any additional information below.

Reported by Lab.Bhattacharjee on 2013-07-10 09:31:45


- _Attachment: [nonASCII (2).zip](https://storage.googleapis.com/google-code-attachments/play2-maven-plugin/issue-2/comment-0/nonASCII %282%29.zip)_
@gslowikowski

This comment has been minimized.

Copy link
Contributor

gslowikowski commented Oct 19, 2015

Encoding was not passed properly to "scalac" and "javac" compilers.

1.0.0-alpha2-SNAPSHOT deployed. Try it please.

You have to add:

<pluginRepositories>
    <pluginRepository>
        <id>sonatype-nexus-snapshots</id>
        <name>Sonatype Nexus Snapshots</name>
        <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        <releases>
            <enabled>false</enabled>
        </releases>
    </pluginRepository>
</pluginRepositories>

to your pom.xml

set properties: 

<project.build.sourceEncoding>Cp1252</project.build.sourceEncoding>
<play2.plugin.version>1.0.0-alpha2-SNAPSHOT</play2.plugin.version>

and use "play2.plugin.version" property as plugin version:

<plugin>
    <groupId>com.google.code.play2-maven-plugin</groupId>
    <artifactId>play2-maven-plugin</artifactId>
    <version>${play2.plugin.version}</version>
    ...
</plugin>

or set version to "1.0.0-alpha2-SNAPSHOT" directly (and remove "play2.plugin.version"
property).

I've had problems with your sample project. I think your Application.java controller
contains non-cp1252 characters. I've copied some characters from http://pl.wikipedia.org/wiki/Windows-1252
and it worked.

Reported by gslowikowski on 2013-07-12 08:47:11

@gslowikowski

This comment has been minimized.

Copy link
Contributor

gslowikowski commented Oct 19, 2015

Reported by gslowikowski on 2013-07-12 08:47:19

  • Status changed: Accepted
@gslowikowski

This comment has been minimized.

Copy link
Contributor

gslowikowski commented Oct 19, 2015

Issue 3 has been merged into this issue.

Reported by gslowikowski on 2013-09-20 13:20:53

@gslowikowski

This comment has been minimized.

Copy link
Contributor

gslowikowski commented Oct 19, 2015

Version 1.0.0-alpha2 released.

Reported by gslowikowski on 2013-09-20 13:21:47

  • Status changed: Fixed
  • Labels added: Milestone-1.0.0-alpha2, Usability
@gslowikowski

This comment has been minimized.

Copy link
Contributor

gslowikowski commented Oct 19, 2015

Forgot to mention that bug was fixed in [http://code.google.com/p/play2-maven-plugin/source/detail?r=64
rev. 64]

Reported by gslowikowski on 2013-09-20 13:28:28

@gslowikowski

This comment has been minimized.

Copy link
Contributor

gslowikowski commented Oct 19, 2015

Issue 3 has been merged into this issue.

Reported by gslowikowski on 2013-09-24 15:30:48

@gslowikowski

This comment has been minimized.

Copy link
Contributor

gslowikowski commented Oct 19, 2015

Issue 3 has been merged into this issue.

Reported by gslowikowski on 2013-09-25 08:40:51

@gslowikowski

This comment has been minimized.

Copy link
Contributor

gslowikowski commented Oct 19, 2015

Reported by gslowikowski on 2014-06-02 07:46:49

@gslowikowski

This comment has been minimized.

Copy link
Contributor

gslowikowski commented Oct 19, 2015

Issue 3 has been merged into this issue.

Reported by gslowikowski on 2014-06-02 07:46:57

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment