GitHub user logan2013 opened a pull request:

    https://github.com/apache/commons-io/pull/16

    UTF-8 file became GBK after BOMInputStream copy

    Hello,
    
    I try to use BOMInputStream & IOUtils to copy a UTF-8 jquery file, but the 
target file's encoding changed to GBK.
    
    here is my code:
    
                InputStream is = new BOMInputStream(
                                new 
FileInputStream("src/main/resources/static/assets/javascripts/jquery.1.8.3.min.js"));
    
                File newFile = new File("jquery.js");
                newFile.createNewFile();
    
                IOUtils.copy(is, new FileOutputStream(newFile));
    
    Could you please help me? Thanks in advance!

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/apache/commons-io IO_1_4_BRANCH

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/commons-io/pull/16.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #16
    
----
commit 9d560bcde4960f93da4da8739ef1f5f047b8231b
Author: Niall Kegan Pemberton <nia...@apache.org>
Date:   2008-02-06T18:25:26Z

    Create IO 1.4 Branch
    
    git-svn-id: 
https://svn.apache.org/repos/asf/commons/proper/io/branches/IO_1_4_BRANCH@619092
 13f79535-47bb-0310-9956-ffa450edef68

commit 5d40aed19fcb837ac1b7ab6d07b9e82ed178ddbd
Author: Sebastian Bazley <s...@apache.org>
Date:   2015-12-10T18:14:34Z

    Obsolete DOAP
    
    git-svn-id: 
https://svn.apache.org/repos/asf/commons/proper/io/branches/IO_1_4_BRANCH@1719155
 13f79535-47bb-0310-9956-ffa450edef68

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org

Reply via email to