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

Multi-byte name problem Shift_JIS(Japanese) #1105

Closed
cyberduck opened this issue Apr 23, 2007 · 3 comments
Closed

Multi-byte name problem Shift_JIS(Japanese) #1105

cyberduck opened this issue Apr 23, 2007 · 3 comments

Comments

@cyberduck
Copy link
Collaborator

92579b4 created the issue

Hi.

There are plural letter expression methods as a problem in specifications of Unicode.

Ex.

HIRAGANA LETTER BA : u3070 == u306f u3099

HIRAGANA LETTER PA : u3071 == u306f u309a

Local file system absorbs the problem. But Shift_JIS used server Problem.
However, a problem happens with a server using Shift_JIS for.

Ex. UTF -> Shift_JIS

u3070 -> 0x82ce<br />
u306f u3099 -> 0x82cd 0x3f(error)

I am not good at the Java language.
Therefore I do not understand the most suitable method, but deal by the following methods.

ch.cyberduck.core.Path
    public static String normalize(final String path) {
              ||
              ||
        // Return the normalized path that we have completed<br />
        //return normalized;<br />
		String n="";<br />
		char chw = 0;<br />
		for(int i=0; i<normalized.length(); i++) {<br />
			char ch = normalized.charAt(i);<br />
			if(ch == 12441) {			//	daku<br />
				chw += 1;<br />
			} else if(ch == 12442) {	//	handaku<br />
				chw += 2;<br />
			} else {<br />
				if(chw != 0) {<br />
					n += chw;<br />
				}<br />
				chw = ch;<br />
			}<br />
		}<br />
		n += chw;<br />
        return n;<br />
    }

Please examine an appropriate method.

thanks.

@cyberduck
Copy link
Collaborator Author

@cyberduck
Copy link
Collaborator Author

@cyberduck
Copy link
Collaborator Author

@dkocher commented

Should be fixed in 6b8e0c5. All filnames are now normalized.

@iterate-ch iterate-ch locked as resolved and limited conversation to collaborators Nov 26, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants