Skip to content
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

File content is getting enocode when file been saved into alfresco. #5

Open
GoogleCodeExporter opened this issue Mar 14, 2015 · 0 comments

Comments

@GoogleCodeExporter
Copy link

1. take the file1.txt attached
2. take the file2.txt attached
3. upload both to the alfresco
4. use webdav to see the files i.e., file1.txt, file2.txt

Expected output is file content can not be encoded while seeing it through 
webdav.
actual output : file1.txt is not proper file2.txt is proper

i have generated file2.txt using the below program.


File file = new File("C:\\file1.txt");
        FileInputStream fis = new FileInputStream(file);
        InputStreamReader isr = new InputStreamReader(fis,"UTF-8");
        BufferedReader in = new BufferedReader(isr);
        FileOutputStream fo = new FileOutputStream(new File("C:\\file2.txt"));
        OutputStreamWriter osr = new OutputStreamWriter(fo);
        BufferedWriter bw = new BufferedWriter(osr);
        StringBuilder sb = new StringBuilder();
        String line;
        while((line = in.readLine()) != null) {         
                bw.write(line);
                bw.write("\n");
        }
        bw.close();
        osr.close();
        fo.close();
        in.close();
        isr.close();
        fis.close();

Problem:- when i upload files through alfresco UI, file1 content is getting 
encode, but not file2 at the time of viewing the file using webdav. if i upload 
both the files through java program and if i see the file contents using webdav 
both the file contents are getting encode. the code used to upload the file to 
alfresco is attached in the file code.txt.

we need to upload the file asitis. with out changing the encoding style at the 
time of upload the file to Alfresco using java program mentioned in the 
code1.txt

please help me in this

thanks,
Saran.



Original issue reported on code.google.com by [email protected] on 12 Mar 2014 at 3:27

Attachments:

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

No branches or pull requests

1 participant