You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by jiangshachina <ji...@gmail.com> on 2007/04/29 11:40:56 UTC

encoding of file name?

Hi guys,
I'm using Maven 2.0.4 + JDK 1.5.0 + Windows 2000 (Chinese version)
Some names of my project's files have Chinese characters.
When I made a package file (ex. war) by running "mvn package",
the Chinese characters would be in wrong encoding.

With my tests, I find that Maven uses UTF-8 encoding to deal with the file
names,
because I got right result if the files were in a Linux system with
zh_CN.UTF-8.
But the default encoding of my operation system is GBK.
And I didn't set any non-default encoding to maven-resources-plugin.
How to cancel the trouble?

Thanks in advance!

a cup of Java, cheers!
Sha Jiang
-- 
View this message in context: http://www.nabble.com/encoding-of-file-name--tf3664927s177.html#a10240267
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: encoding of file name?

Posted by jiangshachina <ji...@gmail.com>.
Hi,
I think the problem isn't related to maven-resources-plugin.
The plugin just copy project resources to the output directory.
Since my files in "exploed pakcage" were well,
then I think maven-resources-plugin had worked well.

a cup of Java, cheers!
Sha Jiang


sam-98 wrote:
> 
> Hi,
>     why don't you try to set the maven-resources-plugin's encoding
> property
> like this:
> <project>
>   ...
>   <build>
>     <plugins>
>       <plugin>
>         <groupId>org.apache.maven.plugins</groupId>
>         <artifactId>maven-resources-plugin</artifactId>
>         <configuration>
>           ...
>           <encoding>UTF-8</encoding>
>           ...
>         </configuration>
>       </plugin>
>     </plugins>
>   ...
>   </build>
>   ...
> </project>
> 
> 
> 2007/4/30, jiangshachina <ji...@gmail.com>:
>>
>>
>> Hi,
>> Thanks for your reply.
>> Unfortunately, I don't resolve the problem with your instruction.
>> In fact, I don't believe Maven use UTF-8 as default encoding,
>> I think Maven must use native encoding as its default.
>>
>> I ever set encoding UTF-8 to maven-resources-plugin,
>> but yesterday I removed the setting.
>> And surely that there isn't any encoding setting in my any POM, now.
>> But Maven still manipulate my files with UTF-8?!
>> I'm so puzzled by the trouble :-(
>>
>> Happy a new holiday!
>>
>> a cup of Java, cheers!
>> Sha Jiang
>>
>>
>> 秋秋 wrote:
>> >
>> > hi,
>> >   long time no see,I have not meet the trouble like yours,but I have a
>> > advance for this,set the encoding's value like the this in your pom.xml
>> >
>> > <?xml version="1.0" encoding="GBK"?>
>> > <project>
>> > .
>> > .
>> > .
>> > </project>
>> >
>> > good luck!
>> >
>> > 2007/4/29, jiangshachina <ji...@gmail.com>:
>> >>
>> >>
>> >> Hi guys,
>> >> I'm using Maven 2.0.4 + JDK 1.5.0 + Windows 2000 (Chinese version)
>> >> Some names of my project's files have Chinese characters.
>> >> When I made a package file (ex. war) by running "mvn package",
>> >> the Chinese characters would be in wrong encoding.
>> >>
>> >> With my tests, I find that Maven uses UTF-8 encoding to deal with the
>> >> file
>> >> names,
>> >> because I got right result if the files were in a Linux system with
>> >> zh_CN.UTF-8.
>> >> But the default encoding of my operation system is GBK.
>> >> And I didn't set any non-default encoding to maven-resources-plugin.
>> >> How to cancel the trouble?
>> >>
>> >> Thanks in advance!
>> >>
>> >> a cup of Java, cheers!
>> >> Sha Jiang
>> >> --
>> >> View this message in context:
>> >>
>> http://www.nabble.com/encoding-of-file-name--tf3664927s177.html#a10240267
>> >> Sent from the Maven - Users mailing list archive at Nabble.com.
>> >>
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> >> For additional commands, e-mail: users-help@maven.apache.org
>> >>
>> >>
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/encoding-of-file-name--tf3664927s177.html#a10247086
>> Sent from the Maven - Users mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/encoding-of-file-name--tf3664927s177.html#a10247899
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: encoding of file name?

Posted by jiangshachina <ji...@gmail.com>.
Hi,
> From the tests, I'm sure that Maven uses UTF-8 to make archive files by
> default.
If that's true, then we'd better not to use non-ascii characters in file
names.

a cup of Java, cheers!
Sha Jiang


jiangshachina wrote:
> 
> Hello,
> I made some test with Linux -- Red Hat AS 4.0.
> [1]I set system language to "zh_CN.UTF-8",
> then I created a text file which name included Chinese characters.
> I run "mvn package" to make war file, and finished successfully.
> I unzipped the war file and found that the specific file's name was shown
> normally.
> 
> [2]I set system language to "zh_CN.GBK",
> I also created a text file which name included Chinese characters.
> I run "mvn package" to make war file, and finished successfully, too.
> I unzipped the war file and found that the specific file's name was not
> shown normally.
> It meant that the Chinese characters wasn't in GBK encoding.
> 
> [3]I made system return to "zh_CN.UTF-8" language.
> I checked the name of the war file which created by step 2,
> the name was pretty in right format.
> It meant that the Chinese characters was in UTF-8 encoding.
> 
> From the tests, I'm sure that Maven uses UTF-8 to make archive files by
> default.
> 
> a cup of Java, cheers!
> Sha Jiang
> 
> 
> jiangshachina wrote:
>> 
>> Hello
>>> <encoding>GBK</encoding>
>> Really, I had tried, but it didn't work :-(
>> And one point must be cared:
>> In the exploded package (a directory) before real "packaging",
>> all of files' names are OK.
>> The trouble merely occurred at "packaging".
>> 
>> 
>> sam-98 wrote:
>>> 
>>>  <encoding>GBK</encoding>
>>> 
>>> 
>>> 2007/4/30, sam <qi...@gmail.com>:
>>>>
>>>> Hi,
>>>>     why don't you try to set the maven-resources-plugin's encoding
>>>> property like this:
>>>> <project>
>>>>   ...
>>>>   <build>
>>>>     <plugins>
>>>>       <plugin>
>>>>         <groupId>org.apache.maven.plugins</groupId>
>>>>         <artifactId>maven-resources-plugin</artifactId>
>>>>         <configuration>
>>>>           ...
>>>>           <encoding>UTF-8</encoding>
>>>>           ...
>>>>         </configuration>
>>>>       </plugin>
>>>>     </plugins>
>>>>   ...
>>>>   </build>
>>>>   ...
>>>> </project>
>>>>
>>>>
>>>> 2007/4/30, jiangshachina <ji...@gmail.com>:
>>>> >
>>>> >
>>>> > Hi,
>>>> > Thanks for your reply.
>>>> > Unfortunately, I don't resolve the problem with your instruction.
>>>> > In fact, I don't believe Maven use UTF-8 as default encoding,
>>>> > I think Maven must use native encoding as its default.
>>>> >
>>>> > I ever set encoding UTF-8 to maven-resources-plugin,
>>>> > but yesterday I removed the setting.
>>>> > And surely that there isn't any encoding setting in my any POM, now.
>>>> > But Maven still manipulate my files with UTF-8?!
>>>> > I'm so puzzled by the trouble :-(
>>>> >
>>>> > Happy a new holiday!
>>>> >
>>>> > a cup of Java, cheers!
>>>> > Sha Jiang
>>>> >
>>>> >
>>>> > 秋秋 wrote:
>>>> > >
>>>> > > hi,
>>>> > >   long time no see,I have not meet the trouble like yours,but I
>>>> have a
>>>> > > advance for this,set the encoding's value like the this in your
>>>> > pom.xml
>>>> > >
>>>> > > <?xml version="1.0" encoding="GBK"?>
>>>> > > <project>
>>>> > > .
>>>> > > .
>>>> > > .
>>>> > > </project>
>>>> > >
>>>> > > good luck!
>>>> > >
>>>> > > 2007/4/29, jiangshachina < jiangshachina@gmail.com>:
>>>> > >>
>>>> > >>
>>>> > >> Hi guys,
>>>> > >> I'm using Maven 2.0.4 + JDK 1.5.0 + Windows 2000 (Chinese version)
>>>> > >> Some names of my project's files have Chinese characters.
>>>> > >> When I made a package file (ex. war) by running "mvn package",
>>>> > >> the Chinese characters would be in wrong encoding.
>>>> > >>
>>>> > >> With my tests, I find that Maven uses UTF-8 encoding to deal with
>>>> the
>>>> >
>>>> > >> file
>>>> > >> names,
>>>> > >> because I got right result if the files were in a Linux system
>>>> with
>>>> > >> zh_CN.UTF-8.
>>>> > >> But the default encoding of my operation system is GBK.
>>>> > >> And I didn't set any non-default encoding to
>>>> maven-resources-plugin.
>>>> > >> How to cancel the trouble?
>>>> > >>
>>>> > >> Thanks in advance!
>>>> > >>
>>>> > >> a cup of Java, cheers!
>>>> > >> Sha Jiang
>>>> > >> --
>>>> > >> View this message in context:
>>>> > >>
>>>> >
>>>> http://www.nabble.com/encoding-of-file-name--tf3664927s177.html#a10240267
>>>> > >> Sent from the Maven - Users mailing list archive at
>>>> Nabble.com<http://nabble.com/>
>>>> > .
>>>> > >>
>>>> > >>
>>>> > >>
>>>> ---------------------------------------------------------------------
>>>> > >> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>>> > >> For additional commands, e-mail: users-help@maven.apache.org
>>>> > >>
>>>> > >>
>>>> > >
>>>> > >
>>>> >
>>>> > --
>>>> > View this message in context:
>>>> >
>>>> http://www.nabble.com/encoding-of-file-name--tf3664927s177.html#a10247086
>>>> > Sent from the Maven - Users mailing list archive at
>>>> Nabble.com<http://nabble.com/>
>>>> > .
>>>> >
>>>> >
>>>> > ---------------------------------------------------------------------
>>>> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>>> > For additional commands, e-mail: users-help@maven.apache.org
>>>> >
>>>> >
>>>>
>>> 
>>> 
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/encoding-of-file-name--tf3664927s177.html#a10264293
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: encoding of file name?

Posted by jiangshachina <ji...@gmail.com>.
Hello,
I made some test with Linux -- Red Hat AS 4.0.
[1]I set system language to "zh_CN.UTF-8",
then I created a text file which name included Chinese characters.
I run "mvn package" to make war file, and finished successfully.
I unzipped the war file and found that the specific file's name was shown
normally.

[2]I set system language to "zh_CN.GBK",
I also created a text file which name included Chinese characters.
I run "mvn package" to make war file, and finished successfully, too.
I unzipped the war file and found that the specific file's name was not
shown normally.
It meant that the Chinese characters wasn't in GBK encoding.

[3]I made system return to "zh_CN.UTF-8" language.
I checked the name of the war file which created by step 2,
the name was pretty in right format.
It meant that the Chinese characters was in UTF-8 encoding.

>From the tests, I'm sure that Maven uses UTF-8 to make archive files by
default.

a cup of Java, cheers!
Sha Jiang


jiangshachina wrote:
> 
> Hello
>> <encoding>GBK</encoding>
> Really, I had tried, but it didn't work :-(
> And one point must be cared:
> In the exploded package (a directory) before real "packaging",
> all of files' names are OK.
> The trouble merely occurred at "packaging".
> 
> 
> sam-98 wrote:
>> 
>>  <encoding>GBK</encoding>
>> 
>> 
>> 2007/4/30, sam <qi...@gmail.com>:
>>>
>>> Hi,
>>>     why don't you try to set the maven-resources-plugin's encoding
>>> property like this:
>>> <project>
>>>   ...
>>>   <build>
>>>     <plugins>
>>>       <plugin>
>>>         <groupId>org.apache.maven.plugins</groupId>
>>>         <artifactId>maven-resources-plugin</artifactId>
>>>         <configuration>
>>>           ...
>>>           <encoding>UTF-8</encoding>
>>>           ...
>>>         </configuration>
>>>       </plugin>
>>>     </plugins>
>>>   ...
>>>   </build>
>>>   ...
>>> </project>
>>>
>>>
>>> 2007/4/30, jiangshachina <ji...@gmail.com>:
>>> >
>>> >
>>> > Hi,
>>> > Thanks for your reply.
>>> > Unfortunately, I don't resolve the problem with your instruction.
>>> > In fact, I don't believe Maven use UTF-8 as default encoding,
>>> > I think Maven must use native encoding as its default.
>>> >
>>> > I ever set encoding UTF-8 to maven-resources-plugin,
>>> > but yesterday I removed the setting.
>>> > And surely that there isn't any encoding setting in my any POM, now.
>>> > But Maven still manipulate my files with UTF-8?!
>>> > I'm so puzzled by the trouble :-(
>>> >
>>> > Happy a new holiday!
>>> >
>>> > a cup of Java, cheers!
>>> > Sha Jiang
>>> >
>>> >
>>> > 秋秋 wrote:
>>> > >
>>> > > hi,
>>> > >   long time no see,I have not meet the trouble like yours,but I have
>>> a
>>> > > advance for this,set the encoding's value like the this in your
>>> > pom.xml
>>> > >
>>> > > <?xml version="1.0" encoding="GBK"?>
>>> > > <project>
>>> > > .
>>> > > .
>>> > > .
>>> > > </project>
>>> > >
>>> > > good luck!
>>> > >
>>> > > 2007/4/29, jiangshachina < jiangshachina@gmail.com>:
>>> > >>
>>> > >>
>>> > >> Hi guys,
>>> > >> I'm using Maven 2.0.4 + JDK 1.5.0 + Windows 2000 (Chinese version)
>>> > >> Some names of my project's files have Chinese characters.
>>> > >> When I made a package file (ex. war) by running "mvn package",
>>> > >> the Chinese characters would be in wrong encoding.
>>> > >>
>>> > >> With my tests, I find that Maven uses UTF-8 encoding to deal with
>>> the
>>> >
>>> > >> file
>>> > >> names,
>>> > >> because I got right result if the files were in a Linux system with
>>> > >> zh_CN.UTF-8.
>>> > >> But the default encoding of my operation system is GBK.
>>> > >> And I didn't set any non-default encoding to
>>> maven-resources-plugin.
>>> > >> How to cancel the trouble?
>>> > >>
>>> > >> Thanks in advance!
>>> > >>
>>> > >> a cup of Java, cheers!
>>> > >> Sha Jiang
>>> > >> --
>>> > >> View this message in context:
>>> > >>
>>> >
>>> http://www.nabble.com/encoding-of-file-name--tf3664927s177.html#a10240267
>>> > >> Sent from the Maven - Users mailing list archive at
>>> Nabble.com<http://nabble.com/>
>>> > .
>>> > >>
>>> > >>
>>> > >>
>>> ---------------------------------------------------------------------
>>> > >> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>> > >> For additional commands, e-mail: users-help@maven.apache.org
>>> > >>
>>> > >>
>>> > >
>>> > >
>>> >
>>> > --
>>> > View this message in context:
>>> >
>>> http://www.nabble.com/encoding-of-file-name--tf3664927s177.html#a10247086
>>> > Sent from the Maven - Users mailing list archive at
>>> Nabble.com<http://nabble.com/>
>>> > .
>>> >
>>> >
>>> > ---------------------------------------------------------------------
>>> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>> > For additional commands, e-mail: users-help@maven.apache.org
>>> >
>>> >
>>>
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/encoding-of-file-name--tf3664927s177.html#a10249597
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: encoding of file name?

Posted by jiangshachina <ji...@gmail.com>.
Hello
> <encoding>GBK</encoding>
Really, I had tried, but it didn't work :-(
And one point must be cared:
In the exploded package (a directory) before real "packaging",
all of files' names are OK.
The trouble merely occurred at "packaging".


sam-98 wrote:
> 
>  <encoding>GBK</encoding>
> 
> 
> 2007/4/30, sam <qi...@gmail.com>:
>>
>> Hi,
>>     why don't you try to set the maven-resources-plugin's encoding
>> property like this:
>> <project>
>>   ...
>>   <build>
>>     <plugins>
>>       <plugin>
>>         <groupId>org.apache.maven.plugins</groupId>
>>         <artifactId>maven-resources-plugin</artifactId>
>>         <configuration>
>>           ...
>>           <encoding>UTF-8</encoding>
>>           ...
>>         </configuration>
>>       </plugin>
>>     </plugins>
>>   ...
>>   </build>
>>   ...
>> </project>
>>
>>
>> 2007/4/30, jiangshachina <ji...@gmail.com>:
>> >
>> >
>> > Hi,
>> > Thanks for your reply.
>> > Unfortunately, I don't resolve the problem with your instruction.
>> > In fact, I don't believe Maven use UTF-8 as default encoding,
>> > I think Maven must use native encoding as its default.
>> >
>> > I ever set encoding UTF-8 to maven-resources-plugin,
>> > but yesterday I removed the setting.
>> > And surely that there isn't any encoding setting in my any POM, now.
>> > But Maven still manipulate my files with UTF-8?!
>> > I'm so puzzled by the trouble :-(
>> >
>> > Happy a new holiday!
>> >
>> > a cup of Java, cheers!
>> > Sha Jiang
>> >
>> >
>> > 秋秋 wrote:
>> > >
>> > > hi,
>> > >   long time no see,I have not meet the trouble like yours,but I have
>> a
>> > > advance for this,set the encoding's value like the this in your
>> > pom.xml
>> > >
>> > > <?xml version="1.0" encoding="GBK"?>
>> > > <project>
>> > > .
>> > > .
>> > > .
>> > > </project>
>> > >
>> > > good luck!
>> > >
>> > > 2007/4/29, jiangshachina < jiangshachina@gmail.com>:
>> > >>
>> > >>
>> > >> Hi guys,
>> > >> I'm using Maven 2.0.4 + JDK 1.5.0 + Windows 2000 (Chinese version)
>> > >> Some names of my project's files have Chinese characters.
>> > >> When I made a package file (ex. war) by running "mvn package",
>> > >> the Chinese characters would be in wrong encoding.
>> > >>
>> > >> With my tests, I find that Maven uses UTF-8 encoding to deal with
>> the
>> >
>> > >> file
>> > >> names,
>> > >> because I got right result if the files were in a Linux system with
>> > >> zh_CN.UTF-8.
>> > >> But the default encoding of my operation system is GBK.
>> > >> And I didn't set any non-default encoding to maven-resources-plugin.
>> > >> How to cancel the trouble?
>> > >>
>> > >> Thanks in advance!
>> > >>
>> > >> a cup of Java, cheers!
>> > >> Sha Jiang
>> > >> --
>> > >> View this message in context:
>> > >>
>> >
>> http://www.nabble.com/encoding-of-file-name--tf3664927s177.html#a10240267
>> > >> Sent from the Maven - Users mailing list archive at
>> Nabble.com<http://nabble.com/>
>> > .
>> > >>
>> > >>
>> > >>
>> ---------------------------------------------------------------------
>> > >> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> > >> For additional commands, e-mail: users-help@maven.apache.org
>> > >>
>> > >>
>> > >
>> > >
>> >
>> > --
>> > View this message in context:
>> >
>> http://www.nabble.com/encoding-of-file-name--tf3664927s177.html#a10247086
>> > Sent from the Maven - Users mailing list archive at
>> Nabble.com<http://nabble.com/>
>> > .
>> >
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> > For additional commands, e-mail: users-help@maven.apache.org
>> >
>> >
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/encoding-of-file-name--tf3664927s177.html#a10247861
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: encoding of file name?

Posted by sam <qi...@gmail.com>.
 <encoding>GBK</encoding>


2007/4/30, sam <qi...@gmail.com>:
>
> Hi,
>     why don't you try to set the maven-resources-plugin's encoding
> property like this:
> <project>
>   ...
>   <build>
>     <plugins>
>       <plugin>
>         <groupId>org.apache.maven.plugins</groupId>
>         <artifactId>maven-resources-plugin</artifactId>
>         <configuration>
>           ...
>           <encoding>UTF-8</encoding>
>           ...
>         </configuration>
>       </plugin>
>     </plugins>
>   ...
>   </build>
>   ...
> </project>
>
>
> 2007/4/30, jiangshachina <ji...@gmail.com>:
> >
> >
> > Hi,
> > Thanks for your reply.
> > Unfortunately, I don't resolve the problem with your instruction.
> > In fact, I don't believe Maven use UTF-8 as default encoding,
> > I think Maven must use native encoding as its default.
> >
> > I ever set encoding UTF-8 to maven-resources-plugin,
> > but yesterday I removed the setting.
> > And surely that there isn't any encoding setting in my any POM, now.
> > But Maven still manipulate my files with UTF-8?!
> > I'm so puzzled by the trouble :-(
> >
> > Happy a new holiday!
> >
> > a cup of Java, cheers!
> > Sha Jiang
> >
> >
> > 秋秋 wrote:
> > >
> > > hi,
> > >   long time no see,I have not meet the trouble like yours,but I have a
> > > advance for this,set the encoding's value like the this in your
> > pom.xml
> > >
> > > <?xml version="1.0" encoding="GBK"?>
> > > <project>
> > > .
> > > .
> > > .
> > > </project>
> > >
> > > good luck!
> > >
> > > 2007/4/29, jiangshachina < jiangshachina@gmail.com>:
> > >>
> > >>
> > >> Hi guys,
> > >> I'm using Maven 2.0.4 + JDK 1.5.0 + Windows 2000 (Chinese version)
> > >> Some names of my project's files have Chinese characters.
> > >> When I made a package file (ex. war) by running "mvn package",
> > >> the Chinese characters would be in wrong encoding.
> > >>
> > >> With my tests, I find that Maven uses UTF-8 encoding to deal with the
> >
> > >> file
> > >> names,
> > >> because I got right result if the files were in a Linux system with
> > >> zh_CN.UTF-8.
> > >> But the default encoding of my operation system is GBK.
> > >> And I didn't set any non-default encoding to maven-resources-plugin.
> > >> How to cancel the trouble?
> > >>
> > >> Thanks in advance!
> > >>
> > >> a cup of Java, cheers!
> > >> Sha Jiang
> > >> --
> > >> View this message in context:
> > >>
> > http://www.nabble.com/encoding-of-file-name--tf3664927s177.html#a10240267
> > >> Sent from the Maven - Users mailing list archive at Nabble.com<http://nabble.com/>
> > .
> > >>
> > >>
> > >> ---------------------------------------------------------------------
> > >> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > >> For additional commands, e-mail: users-help@maven.apache.org
> > >>
> > >>
> > >
> > >
> >
> > --
> > View this message in context:
> > http://www.nabble.com/encoding-of-file-name--tf3664927s177.html#a10247086
> > Sent from the Maven - Users mailing list archive at Nabble.com<http://nabble.com/>
> > .
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>

Re: encoding of file name?

Posted by sam <qi...@gmail.com>.
Hi,
    why don't you try to set the maven-resources-plugin's encoding property
like this:
<project>
  ...
  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-resources-plugin</artifactId>
        <configuration>
          ...
          <encoding>UTF-8</encoding>
          ...
        </configuration>
      </plugin>
    </plugins>
  ...
  </build>
  ...
</project>


2007/4/30, jiangshachina <ji...@gmail.com>:
>
>
> Hi,
> Thanks for your reply.
> Unfortunately, I don't resolve the problem with your instruction.
> In fact, I don't believe Maven use UTF-8 as default encoding,
> I think Maven must use native encoding as its default.
>
> I ever set encoding UTF-8 to maven-resources-plugin,
> but yesterday I removed the setting.
> And surely that there isn't any encoding setting in my any POM, now.
> But Maven still manipulate my files with UTF-8?!
> I'm so puzzled by the trouble :-(
>
> Happy a new holiday!
>
> a cup of Java, cheers!
> Sha Jiang
>
>
> 秋秋 wrote:
> >
> > hi,
> >   long time no see,I have not meet the trouble like yours,but I have a
> > advance for this,set the encoding's value like the this in your pom.xml
> >
> > <?xml version="1.0" encoding="GBK"?>
> > <project>
> > .
> > .
> > .
> > </project>
> >
> > good luck!
> >
> > 2007/4/29, jiangshachina <ji...@gmail.com>:
> >>
> >>
> >> Hi guys,
> >> I'm using Maven 2.0.4 + JDK 1.5.0 + Windows 2000 (Chinese version)
> >> Some names of my project's files have Chinese characters.
> >> When I made a package file (ex. war) by running "mvn package",
> >> the Chinese characters would be in wrong encoding.
> >>
> >> With my tests, I find that Maven uses UTF-8 encoding to deal with the
> >> file
> >> names,
> >> because I got right result if the files were in a Linux system with
> >> zh_CN.UTF-8.
> >> But the default encoding of my operation system is GBK.
> >> And I didn't set any non-default encoding to maven-resources-plugin.
> >> How to cancel the trouble?
> >>
> >> Thanks in advance!
> >>
> >> a cup of Java, cheers!
> >> Sha Jiang
> >> --
> >> View this message in context:
> >>
> http://www.nabble.com/encoding-of-file-name--tf3664927s177.html#a10240267
> >> Sent from the Maven - Users mailing list archive at Nabble.com.
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> >> For additional commands, e-mail: users-help@maven.apache.org
> >>
> >>
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/encoding-of-file-name--tf3664927s177.html#a10247086
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: encoding of file name?

Posted by jiangshachina <ji...@gmail.com>.
Hi,
Thanks for your reply.
Unfortunately, I don't resolve the problem with your instruction.
In fact, I don't believe Maven use UTF-8 as default encoding,
I think Maven must use native encoding as its default.

I ever set encoding UTF-8 to maven-resources-plugin,
but yesterday I removed the setting.
And surely that there isn't any encoding setting in my any POM, now.
But Maven still manipulate my files with UTF-8?!
I'm so puzzled by the trouble :-(

Happy a new holiday!

a cup of Java, cheers!
Sha Jiang


秋秋 wrote:
> 
> hi,
>   long time no see,I have not meet the trouble like yours,but I have a
> advance for this,set the encoding's value like the this in your pom.xml
> 
> <?xml version="1.0" encoding="GBK"?>
> <project>
> .
> .
> .
> </project>
> 
> good luck!
> 
> 2007/4/29, jiangshachina <ji...@gmail.com>:
>>
>>
>> Hi guys,
>> I'm using Maven 2.0.4 + JDK 1.5.0 + Windows 2000 (Chinese version)
>> Some names of my project's files have Chinese characters.
>> When I made a package file (ex. war) by running "mvn package",
>> the Chinese characters would be in wrong encoding.
>>
>> With my tests, I find that Maven uses UTF-8 encoding to deal with the
>> file
>> names,
>> because I got right result if the files were in a Linux system with
>> zh_CN.UTF-8.
>> But the default encoding of my operation system is GBK.
>> And I didn't set any non-default encoding to maven-resources-plugin.
>> How to cancel the trouble?
>>
>> Thanks in advance!
>>
>> a cup of Java, cheers!
>> Sha Jiang
>> --
>> View this message in context:
>> http://www.nabble.com/encoding-of-file-name--tf3664927s177.html#a10240267
>> Sent from the Maven - Users mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/encoding-of-file-name--tf3664927s177.html#a10247086
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: encoding of file name?

Posted by sam <qi...@gmail.com>.
hi,
  long time no see,I have not meet the trouble like yours,but I have a
advance for this,set the encoding's value like the this in your pom.xml

<?xml version="1.0" encoding="GBK"?>
<project>
.
.
.
</project>

good luck!

2007/4/29, jiangshachina <ji...@gmail.com>:
>
>
> Hi guys,
> I'm using Maven 2.0.4 + JDK 1.5.0 + Windows 2000 (Chinese version)
> Some names of my project's files have Chinese characters.
> When I made a package file (ex. war) by running "mvn package",
> the Chinese characters would be in wrong encoding.
>
> With my tests, I find that Maven uses UTF-8 encoding to deal with the file
> names,
> because I got right result if the files were in a Linux system with
> zh_CN.UTF-8.
> But the default encoding of my operation system is GBK.
> And I didn't set any non-default encoding to maven-resources-plugin.
> How to cancel the trouble?
>
> Thanks in advance!
>
> a cup of Java, cheers!
> Sha Jiang
> --
> View this message in context:
> http://www.nabble.com/encoding-of-file-name--tf3664927s177.html#a10240267
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>