mirror of https://github.com/erickguan/ffi-icu.git
Trying out Latin-Greek in C
This commit is contained in:
parent
bb915d6871
commit
0bfc0bba81
|
@ -16,6 +16,8 @@ module ICU
|
|||
ICU::Normalization.normalize("Å", :nfc).unpack("U*").should == [197]
|
||||
end
|
||||
|
||||
# TODO: add more normalization tests
|
||||
|
||||
|
||||
end
|
||||
end # Normalization
|
||||
|
|
|
@ -13,8 +13,8 @@ module ICU
|
|||
|
||||
# after { @t.close if @t }
|
||||
|
||||
it "should transliterate Greek-Latin" do
|
||||
transliterator("Greek-Latin").transliterate("Χελλο Ωορλδ").should == "Hello World"
|
||||
it "should transliterate Latin-Greek" do
|
||||
transliterator("Latin-Greek").transliterate("Hello World").should == "Χελλο Ωορλδ"
|
||||
end
|
||||
|
||||
it "should transliterate Lower" do
|
||||
|
|
4
test.c
4
test.c
|
@ -22,14 +22,14 @@ int main (int argc, char const *argv[])
|
|||
UTransliterator* trans = NULL;
|
||||
UErrorCode status = U_ZERO_ERROR;
|
||||
|
||||
trans = utrans_open("Lower", UTRANS_FORWARD, NULL, 0, NULL, &status);
|
||||
trans = utrans_open("Latin-Greek", UTRANS_FORWARD, NULL, 0, NULL, &status);
|
||||
|
||||
UChar from[256];
|
||||
UChar buf[256];
|
||||
|
||||
int32_t text_length, limit;
|
||||
|
||||
u_uastrcpy(from, "ABC");
|
||||
u_uastrcpy(from, "Hello World");
|
||||
u_strcpy(buf, from);
|
||||
|
||||
limit = text_length = u_strlen(buf);
|
||||
|
|
Loading…
Reference in New Issue