Comment on attachment 570960
Part 3. FTP directory list sets the encoding when current FTP server supports
UTF-8 v2
> + channel->GetContentCharset(mCharset);
> + if (mCharset.EqualsLiteral("UTF-8")) {
> + // For RFC 2640 support, charset is into HTML, not channel.
> + // So we need clear charset on channel.
> + channel->SetContentCharset(NS_LITERAL_CSTRING(""));
> + }
Could you please make the comment more verbose? Why it is needed to
clear the charset and why only in case of UTF8?
> + if (mCharset.EqualsLiteral("UTF-8") && !IsUTF8(mPendingBuffer)) {
> + // RFC 2640 section 3.3 says the following.
> + //
> + // If a client detects that a server is non UTF-8,
> + // it SHOULD change its display appropriately.
> + //
> + // So we need failback encoding.
> + mCharset.AssignLiteral("ISO-8859-1");
> + }
There is still a problem when the directory is empty and its name isn't
a valid UTF8 string. In this case call to
mTextToSubURI->UnEscapeAndConvert() in
nsIndexedToHTML::OnHeaderAvailable() fails.
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/222635
Title:
firefox ftp client don't understand links in cyrillic letters
To manage notifications about this bug go to:
https://bugs.launchpad.net/firefox/+bug/222635/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs