[Fedora-i18n-list] [Fwd: new RELEASE-NOTES.pot available]
by Karsten Wade
Leon:
Can you help us out here? Someone in Fedora Trans is supposed to load
this POT file into i18n.r.c so it could be translate for FC6 ISO.
This is the schedule we've been working from:
http://fedoraproject.org/wiki/DocsProject/Schedule#relnotes-schedule
The PO files must be back by 30 Sep. to make it into the ISO.
thanks - Karsten
-------- Forwarded Message --------
From: Karsten Wade <kwade(a)redhat.com>
Reply-To: kwade(a)redhat.com, Fedora Translation Project List
<fedora-trans-list(a)redhat.com>
To: fedora-trans-list(a)redhat.com
Subject: new RELEASE-NOTES.pot available
Date: Tue, 26 Sep 2006 03:19:02 -0700
The new release notes POT file is available.
We matched the tagging to use the same tags as in test3. Hopefully this
reduces the false fuzzy and false untranslatable entries.
asalam - Please check this POT file and confirm that it is OK for
inclusion in i18n.redhat.com. Upload it ASAP.
Thanks - Karsten
--
Fedora-trans-list mailing list
Fedora-trans-list(a)redhat.com
https://www.redhat.com/mailman/listinfo/fedora-trans-list
--
Karsten Wade, RHCE, 108 Editor ^ Fedora Documentation Project
Sr. Developer Relations Mgr. | fedoraproject.org/wiki/DocsProject
quaid.108.redhat.com | gpg key: AD0E0C41
////////////////////////////////// \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
17 years, 7 months
[Fedora-i18n-list] Re: iconv help required
by Mustafa Jamil
Um, never mind. I have the from/to encodings
reversed. :(
--- Mustafa Jamil <mustafa_jamil(a)yahoo.com> wrote:
> Hey.
>
> I'm trying to write a simple C++ string converter
> that
> takes ISO-8859-1-encoded strings and converts them
> to
> UTF8-encoded strings.
>
> Unfortunately, iconv is dying with EILSEQ, and I
> don't
> know why. I'd appreciate any ideas you may have.
>
> Here's my test program (you can run it with 'g++
> main.cpp; ./a.out'):
>
> -- START --
> #include <string>
> #include <vector>
> #include <iostream>
> #include "errno.h"
>
> using namespace std;
>
> struct i18nError {
> i18nError(const std::string &m) : message(m)
> {
> }
> const std::string message;
> };
>
> std::string
> ConvertString(const std::string& input,
> const std::string& from,
> const std::string& to)
> {
> cout << "DEBUG: Input string = " << input <<
> endl;
> size_t input_bytes_to_read = input.size();
> //returns the byte size
> cout << "DEBUG: input_bytes_to_read = " <<
> input_bytes_to_read << endl;
> char *input_pointer = (char *)input.c_str();
> //cast away the const
>
> size_t output_buffer_size =
> (input_bytes_to_read * 4) + 1;
> cout << "DEBUG: output_buffer_size = " <<
> output_buffer_size << endl;
> size_t output_bytes_left =
> output_buffer_size;
> std::vector<char>
> output_buffer(output_bytes_left);
> char *output_buffer_pointer =
> &output_buffer[0];
>
> iconv_t cd = iconv_open(from.c_str(),
> to.c_str());
> if (cd == (iconv_t) -1) {
> // Could not get suitable conversion
> descriptor
> if (errno == EINVAL) {
> throw i18nError("Conversion
> from " + from + " to " + to + " is not available");
> } else {
> throw i18nError("iconv_open
> failed");
> }
> }
>
> size_t nconv = iconv(cd,
> &input_pointer,
> &input_bytes_to_read,
> &output_buffer_pointer,
> &output_bytes_left);
> if (nconv == (size_t) -1) {
> std::string msg = "iconv failed,
> errno
> = ";
> if (errno == E2BIG) {
> msg += "E2BIG";
> } else if (errno == EILSEQ) {
> msg += "EILSEQ";
> } else if (errno == EINVAL) {
> msg += "EINVAL";
> } else {
> msg += "Unknown";
> }
> throw i18nError(msg);
> }
>
> if (iconv_close(cd) != 0) {
> throw i18nError("iconv_close
> failed");
> }
> cout << "DEBUG: input_bytes_to_read = " <<
> input_bytes_to_read << endl;
> cout << "DEBUG: nconv = " << nconv << endl;
>
> cout << "DEBUG: output_bytes_left = " <<
> output_bytes_left << endl;
> size_t output_bytes_written =
> output_buffer_size - output_bytes_left;
> cout << "DEBUG: output_bytes_written = " <<
> output_bytes_written
> << endl;
> if (output_bytes_written <
> output_buffer_size)
> {
> *output_buffer_pointer = '\0'; //
> explicitly null-terminate
> }
>
> std::string retVal =
> std::string(&output_buffer[0],
> output_buffer.size());
> cout << "DEBUG: Output string = " << retVal
> <<
> endl;
> cout << "DEBUG: Output string size = " <<
> retVal.size() << endl;
> return (retVal);
> }
>
> main()
> {
> try {
> cout <<
> "------------------------------------" << endl;
> std::string bar =
> ConvertString("Hello
> world", "ISO-8859-1", "UTF8");
> cout <<
> "------------------------------------" << endl;
> std::string baz =
> ConvertString("\xA2", "ISO-8859-1", "UTF8");
> cout <<
> "------------------------------------" << endl;
> } catch (i18nError e) {
> cout << e.message << endl;
> }
> }
> -- END --
>
> And here's the output:
>
> ------------------------------------
> DEBUG: Input string = Hello world
> DEBUG: input_bytes_to_read = 11
> DEBUG: output_buffer_size = 45
> DEBUG: input_bytes_to_read = 0
> DEBUG: nconv = 0
> DEBUG: output_bytes_left = 34
> DEBUG: output_bytes_written = 11
> DEBUG: Output string = Hello world
> DEBUG: Output string size = 45
> ------------------------------------
> DEBUG: Input string = �
> DEBUG: input_bytes_to_read = 1
> DEBUG: output_buffer_size = 5
> iconv failed, errno = EILSEQ
>
> I'd appreciate any help you can offer.
>
> Thanks!
>
> Mustafa
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam
> protection around
> http://mail.yahoo.com
>
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
17 years, 7 months
[Fedora-i18n-list] iconv help required
by Mustafa Jamil
Hey.
I'm trying to write a simple C++ string converter that
takes ISO-8859-1-encoded strings and converts them to
UTF8-encoded strings.
Unfortunately, iconv is dying with EILSEQ, and I don't
know why. I'd appreciate any ideas you may have.
Here's my test program (you can run it with 'g++
main.cpp; ./a.out'):
-- START --
#include <string>
#include <vector>
#include <iostream>
#include "errno.h"
using namespace std;
struct i18nError {
i18nError(const std::string &m) : message(m) {
}
const std::string message;
};
std::string
ConvertString(const std::string& input,
const std::string& from,
const std::string& to)
{
cout << "DEBUG: Input string = " << input <<
endl;
size_t input_bytes_to_read = input.size();
//returns the byte size
cout << "DEBUG: input_bytes_to_read = " <<
input_bytes_to_read << endl;
char *input_pointer = (char *)input.c_str();
//cast away the const
size_t output_buffer_size =
(input_bytes_to_read * 4) + 1;
cout << "DEBUG: output_buffer_size = " <<
output_buffer_size << endl;
size_t output_bytes_left = output_buffer_size;
std::vector<char>
output_buffer(output_bytes_left);
char *output_buffer_pointer =
&output_buffer[0];
iconv_t cd = iconv_open(from.c_str(),
to.c_str());
if (cd == (iconv_t) -1) {
// Could not get suitable conversion
descriptor
if (errno == EINVAL) {
throw i18nError("Conversion
from " + from + " to " + to + " is not available");
} else {
throw i18nError("iconv_open
failed");
}
}
size_t nconv = iconv(cd,
&input_pointer,
&input_bytes_to_read,
&output_buffer_pointer,
&output_bytes_left);
if (nconv == (size_t) -1) {
std::string msg = "iconv failed, errno
= ";
if (errno == E2BIG) {
msg += "E2BIG";
} else if (errno == EILSEQ) {
msg += "EILSEQ";
} else if (errno == EINVAL) {
msg += "EINVAL";
} else {
msg += "Unknown";
}
throw i18nError(msg);
}
if (iconv_close(cd) != 0) {
throw i18nError("iconv_close failed");
}
cout << "DEBUG: input_bytes_to_read = " <<
input_bytes_to_read << endl;
cout << "DEBUG: nconv = " << nconv << endl;
cout << "DEBUG: output_bytes_left = " <<
output_bytes_left << endl;
size_t output_bytes_written =
output_buffer_size - output_bytes_left;
cout << "DEBUG: output_bytes_written = " <<
output_bytes_written
<< endl;
if (output_bytes_written < output_buffer_size)
{
*output_buffer_pointer = '\0'; //
explicitly null-terminate
}
std::string retVal =
std::string(&output_buffer[0],
output_buffer.size());
cout << "DEBUG: Output string = " << retVal <<
endl;
cout << "DEBUG: Output string size = " <<
retVal.size() << endl;
return (retVal);
}
main()
{
try {
cout <<
"------------------------------------" << endl;
std::string bar = ConvertString("Hello
world", "ISO-8859-1", "UTF8");
cout <<
"------------------------------------" << endl;
std::string baz =
ConvertString("\xA2", "ISO-8859-1", "UTF8");
cout <<
"------------------------------------" << endl;
} catch (i18nError e) {
cout << e.message << endl;
}
}
-- END --
And here's the output:
------------------------------------
DEBUG: Input string = Hello world
DEBUG: input_bytes_to_read = 11
DEBUG: output_buffer_size = 45
DEBUG: input_bytes_to_read = 0
DEBUG: nconv = 0
DEBUG: output_bytes_left = 34
DEBUG: output_bytes_written = 11
DEBUG: Output string = Hello world
DEBUG: Output string size = 45
------------------------------------
DEBUG: Input string = �
DEBUG: input_bytes_to_read = 1
DEBUG: output_buffer_size = 5
iconv failed, errno = EILSEQ
I'd appreciate any help you can offer.
Thanks!
Mustafa
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
17 years, 7 months