πρόβλημα με ελληνικούς χαρακτήρες σε script (διαμάντια prob)

Βοήθεια λύσεις και νέα από τον χώρο των open source ή έτοιμων εφαρμογών που έχουν φτιαχτεί με την PHP όπως oscommerce, κ.α.

Συντονιστές: WebDev Moderators, Super-Moderators, PHP Moderators

Απάντηση
Άβαταρ μέλους
Simosmme
Δημοσιεύσεις: 240
Εγγραφή: 10 Νοέμ 2005 10:57
Επικοινωνία:

πρόβλημα με ελληνικούς χαρακτήρες σε script (διαμάντια prob)

Δημοσίευση από Simosmme » 13 Απρ 2010 21:12

καλησπέρα!

έχω ένα promo script το οποίο το έχω πάρει μαζί με ένα template.

το θέμα είναι ότι στην περίληψη των θεμάτων, κάποιες φορές και για ανεξήγητο (για μένα) λόγο, βγάζει diamonds αντί για χαρακτήρες ελληνικούς.

Εικόνα

ο προγραμματιστής του script (και δη άσχετος με Ελλάδα) μου είπε να κάνω κάποιες αλλαγές στο featurify ώστε να βλέπει στο translit.

Το εν λόγω απόσπασμα του featurify που δημιουργεί το λάθος που βλέπετε στη φώτο

$featured[$i]['link_summary'] = str_replace("\n", "<br />", $dblink->link_summary);
$featured[$i]['link_summary'] = str_replace("’", "'", $featured[$i]['link_summary']);
$featured[$i]['link_summary'] = str_replace("&#8211;", "-", $featured[$i]['link_summary']);
$featured[$i]['link_summary']= str_replace("&#8212;", "-", $featured[$i]['link_summary']);
$featured[$i]['link_summary'] = str_replace(""", "\"", $featured[$i]['link_summary']);
$featured[$i]['link_summary'] = str_replace(""", "\"", $featured[$i]['link_summary']);

Το translit μου εδώ:

; global transliteration
[default]
« = ""
» = ""
© = ""
&#174; = ""
§ = ""
&#182; = ""
&#10241; = "a"
&#10243; = "b"
&#10249; = "c"
&#10265; = "d"
&#10257; = "e"
&#10251; = "f"
&#10267; = "g"
&#10259; = "h"
&#10250; = "i"
&#10266; = "j"
&#10245; = "k"
&#10247; = "l"
&#10253; = "m"
&#10269; = "n"
&#10261; = "o"
&#10255; = "p"
&#10271; = "q"
&#10263; = "r"
&#10254; = "s"
&#10270; = "t"
&#10277; = "u"
&#10279; = "v"
&#10298; = "w"
&#10285; = "x"
&#10301; = "y"
&#10293; = "z"
&#10296; = "-"
&#10292; = "0"
&#10242; = "1"
&#10246; = "2"
&#10258; = "3"
&#10290; = "4"
&#10274; = "5"
&#10262; = "6"
&#10294; = "7"
&#10278; = "8"
&#10260; = "9"
&#192; = "A"
&#193; = "A"
&#194; = "A"
&#195; = "A"
&#196; = "Ae"
&#197; = "A"
&#198; = "A"
&#256; = "A"
&#260; = "A"
&#258; = "A"
&#199; = "C"
&#262; = "C"
&#268; = "C"
&#264; = "C"
&#266; = "C"
&#270; = "D"
&#272; = "D"
&#200; = "E"
&#201; = "E"
&#202; = "E"
&#203; = "E"
&#274; = "E"
&#280; = "E"
&#282; = "E"
&#276; = "E"
&#278; = "E"
&#284; = "G"
&#286; = "G"
&#288; = "G"
&#290; = "G"
&#292; = "H"
&#294; = "H"
&#204; = "I"
&#205; = "I"
&#206; = "I"
&#207; = "I"
&#298; = "I"
&#296; = "I"
&#300; = "I"
&#302; = "I"
&#304; = "I"
&#306; = "IJ"
&#308; = "J"
&#310; = "K"
&#317; = "K"
&#313; = "K"
&#315; = "K"
&#319; = "K"
&#321; = "L"
&#209; = "N"
&#323; = "N"
&#327; = "N"
&#325; = "N"
&#330; = "N"
&#210; = "O"
&#211; = "O"
&#212; = "O"
&#213; = "O"
&#214; = "Oe"
&#216; = "O"
&#332; = "O"
&#336; = "O"
&#334; = "O"
&#338; = "OE"
&#340; = "R"
&#344; = "R"
&#342; = "R"
&#346; = "S"
&#350; = "S"
&#348; = "S"
&#536; = "S"
&#352; = "S"
&#356; = "T"
&#354; = "T"
&#358; = "T"
&#538; = "T"
&#217; = "U"
&#218; = "U"
&#219; = "U"
&#220; = "Ue"
&#362; = "U"
&#366; = "U"
&#368; = "U"
&#364; = "U"
&#360; = "U"
&#370; = "U"
&#372; = "W"
&#374; = "Y"
&#376; = "Y"
&#221; = "Y"
&#377; = "Z"
&#379; = "Z"
&#381; = "Z"
&#224; = "a"
&#225; = "a"
&#226; = "a"
&#227; = "a"
&#228; = "ae"
&#257; = "a"
&#261; = "a"
&#259; = "a"
&#229; = "a"
&#230; = "ae"
&#231; = "c"
&#263; = "c"
&#269; = "c"
&#265; = "c"
&#267; = "c"
&#271; = "d"
&#273; = "d"
&#232; = "e"
&#233; = "e"
&#234; = "e"
&#235; = "e"
&#275; = "e"
&#281; = "e"
&#283; = "e"
&#277; = "e"
&#279; = "e"
&#402; = "f"
&#285; = "g"
&#287; = "g"
&#289; = "g"
&#291; = "g"
&#293; = "h"
&#295; = "h"
&#236; = "i"
&#237; = "i"
&#238; = "i"
&#239; = "i"
&#299; = "i"
&#297; = "i"
&#301; = "i"
&#303; = "i"
&#305; = "i"
&#307; = "ij"
&#309; = "j"
&#311; = "k"
&#312; = "k"
&#322; = "l"
&#318; = "l"
&#314; = "l"
&#316; = "l"
&#320; = "l"
&#241; = "n"
&#324; = "n"
&#328; = "n"
&#326; = "n"
&#329; = "n"
&#331; = "n"
&#242; = "o"
&#243; = "o"
&#244; = "o"
&#245; = "o"
&#246; = "oe"
&#248; = "o"
&#333; = "o"
&#337; = "o"
&#335; = "o"
&#339; = "oe"
&#341; = "r"
&#345; = "r"
&#343; = "r"
&#347; = "s"
&#353; = "s"
&#351; = "s"
&#357; = "t"
&#355; = "t"
&#249; = "u"
&#250; = "u"
&#251; = "u"
&#252; = "ue"
&#363; = "u"
&#367; = "u"
&#369; = "u"
&#365; = "u"
&#361; = "u"
&#371; = "u"
&#7909; = "u"
&#373; = "w"
&#255; = "y"
&#253; = "y"
&#375; = "y"
&#380; = "z"
&#378; = "z"
&#382; = "z"
&#223; = "ss"
&#383; = "ss"
Α = "A"
Ά = "A"
&#7944; = "A"
&#7945; = "A"
&#7946; = "A"
&#7947; = "A"
&#7948; = "A"
&#7949; = "A"
&#7950; = "A"
&#7951; = "A"
&#8072; = "A"
&#8073; = "A"
&#8074; = "A"
&#8075; = "A"
&#8076; = "A"
&#8077; = "A"
&#8078; = "A"
&#8079; = "A"
&#8120; = "A"
&#8121; = "A"
&#8122; = "A"
&#8123; = "A"
&#8124; = "A"
Β = "B"
Γ = "G"
Δ = "D"
Ε = "E"
Έ = "E"
&#7960; = "E"
&#7961; = "E"
&#7962; = "E"
&#7963; = "E"
&#7964; = "E"
&#7965; = "E"
&#8137; = "E"
&#8136; = "E"
Ζ = "Z"
Η = "I"
Ή = "I"
&#7976; = "I"
&#7977; = "I"
&#7978; = "I"
&#7979; = "I"
&#7980; = "I"
&#7981; = "I"
&#7982; = "I"
&#7983; = "I"
&#8088; = "I"
&#8089; = "I"
&#8090; = "I"
&#8091; = "I"
&#8092; = "I"
&#8093; = "I"
&#8094; = "I"
&#8095; = "I"
&#8138; = "I"
&#8139; = "I"
&#8140; = "I"
Θ = "TH"
Ι = "I"
Ί = "I"
Ϊ = "I"
&#7992; = "I"
&#7993; = "I"
&#7994; = "I"
&#7995; = "I"
&#7996; = "I"
&#7997; = "I"
&#7998; = "I"
&#7999; = "I"
&#8152; = "I"
&#8153; = "I"
&#8154; = "I"
&#8155; = "I"
Κ = "K"
Λ = "L"
Μ = "M"
Ν = "N"
Ξ = "KS"
Ο = "O"
Ό = "O"
&#8008; = "O"
&#8009; = "O"
&#8010; = "O"
&#8011; = "O"
&#8012; = "O"
&#8013; = "O"
&#8184; = "O"
&#8185; = "O"
Π = "P"
Ρ = "R"
&#8172; = "R"
Σ = "S"
Τ = "T"
Υ = "Y"
Ύ = "Y"
Ϋ = "Y"
&#8025; = "Y"
&#8027; = "Y"
&#8029; = "Y"
&#8031; = "Y"
&#8168; = "Y"
&#8169; = "Y"
&#8170; = "Y"
&#8171; = "Y"
Φ = "F"
Χ = "X"
Ψ = "PS"
Ω = "O"
Ώ = "O"
&#8040; = "O"
&#8041; = "O"
&#8042; = "O"
&#8043; = "O"
&#8044; = "O"
&#8045; = "O"
&#8046; = "O"
&#8047; = "O"
&#8104; = "O"
&#8105; = "O"
&#8106; = "O"
&#8107; = "O"
&#8108; = "O"
&#8109; = "O"
&#8110; = "O"
&#8111; = "O"
&#8186; = "O"
&#8187; = "O"
&#8188; = "O"
α = "a"
ά = "a"
&#7936; = "a"
&#7937; = "a"
&#7938; = "a"
&#7939; = "a"
&#7940; = "a"
&#7941; = "a"
&#7942; = "a"
&#7943; = "a"
&#8064; = "a"
&#8065; = "a"
&#8066; = "a"
&#8067; = "a"
&#8068; = "a"
&#8069; = "a"
&#8070; = "a"
&#8071; = "a"
&#8048; = "a"
&#8049; = "a"
&#8112; = "a"
&#8113; = "a"
&#8114; = "a"
&#8115; = "a"
&#8116; = "a"
&#8118; = "a"
&#8119; = "a"
β = "b"
γ = "g"
δ = "d"
ε = "e"
έ = "e"
&#7952; = "e"
&#7953; = "e"
&#7954; = "e"
&#7955; = "e"
&#7956; = "e"
&#7957; = "e"
&#8050; = "e"
&#8051; = "e"
ζ = "z"
η = "i"
ή = "i"
&#7968; = "i"
&#7969; = "i"
&#7970; = "i"
&#7971; = "i"
&#7972; = "i"
&#7973; = "i"
&#7974; = "i"
&#7975; = "i"
&#8080; = "i"
&#8081; = "i"
&#8082; = "i"
&#8083; = "i"
&#8084; = "i"
&#8085; = "i"
&#8086; = "i"
&#8087; = "i"
&#8052; = "i"
&#8053; = "i"
&#8130; = "i"
&#8131; = "i"
&#8132; = "i"
&#8134; = "i"
&#8135; = "i"
θ = "th"
ι = "i"
ί = "i"
ϊ = "i"
ΐ = "i"
&#7984; = "i"
&#7985; = "i"
&#7986; = "i"
&#7987; = "i"
&#7988; = "i"
&#7989; = "i"
&#7990; = "i"
&#7991; = "i"
&#8054; = "i"
&#8055; = "i"
&#8144; = "i"
&#8145; = "i"
&#8146; = "i"
&#8147; = "i"
&#8150; = "i"
&#8151; = "i"
κ = "k"
λ = "l"
μ = "m"
ν = "n"
ξ = "ks"
ο = "o"
ό = "o"
&#8000; = "o"
&#8001; = "o"
&#8002; = "o"
&#8003; = "o"
&#8004; = "o"
&#8005; = "o"
&#8056; = "o"
&#8057; = "o"
π = "p"
ρ = "r"
&#8164; = "r"
&#8165; = "r"
σ = "s"
ς = "s"
τ = "t"
υ = "y"
ύ = "y"
ϋ = "y"
ΰ = "y"
&#8016; = "y"
&#8017; = "y"
&#8018; = "y"
&#8019; = "y"
&#8020; = "y"
&#8021; = "y"
&#8022; = "y"
&#8023; = "y"
&#8058; = "y"
&#8059; = "y"
&#8160; = "y"
&#8161; = "y"
&#8162; = "y"
&#8163; = "y"
&#8166; = "y"
&#8167; = "y"
φ = "f"
χ = "x"
ψ = "ps"
ω = "o"
ώ = "o"
&#8032; = "o"
&#8033; = "o"
&#8034; = "o"
&#8035; = "o"
&#8036; = "o"
&#8037; = "o"
&#8038; = "o"
&#8039; = "o"
&#8096; = "o"
&#8097; = "o"
&#8098; = "o"
&#8099; = "o"
&#8100; = "o"
&#8101; = "o"
&#8102; = "o"
&#8103; = "o"
&#8060; = "o"
&#8061; = "o"
&#8178; = "o"
&#8179; = "o"
&#8180; = "o"
&#8182; = "o"
&#8183; = "o"
¨ = ""
΅ = ""
&#8127; = ""
&#8190; = ""
&#8141; = ""
&#8157; = ""
&#8142; = ""
&#8158; = ""
&#8143; = ""
&#8159; = ""
&#8128; = ""
&#8129; = ""
΄ = ""
&#8174; = ""
&#8175; = ""
&#8173; = ""
ͺ = ""
&#8125; = ""
&#1040; = "A"
&#1041; = "B"
&#1042; = "V"
&#1043; = "G"
&#1044; = "D"
&#1045; = "E"
&#1025; = "E"
&#1046; = "ZH"
&#1047; = "Z"
&#1048; = "I"
&#1049; = "I"
&#1050; = "K"
&#1051; = "L"
&#1052; = "M"
&#1053; = "N"
&#1054; = "O"
&#1055; = "P"
&#1056; = "R"
&#1057; = "S"
&#1058; = "T"
&#1059; = "U"
&#1060; = "F"
&#1061; = "KH"
&#1062; = "TS"
&#1063; = "CH"
&#1064; = "SH"
&#1065; = "SHCH"
&#1067; = "Y"
&#1069; = "E"
&#1070; = "YU"
&#1071; = "YA"
&#1072; = "A"
&#1073; = "B"
&#1074; = "V"
&#1075; = "G"
&#1076; = "D"
&#1077; = "E"
&#1105; = "E"
&#1078; = "ZH"
&#1079; = "Z"
&#1080; = "I"
&#1081; = "I"
&#1082; = "K"
&#1083; = "L"
&#1084; = "M"
&#1085; = "N"
&#1086; = "O"
&#1087; = "P"
&#1088; = "R"
&#1089; = "S"
&#1090; = "T"
&#1091; = "U"
&#1092; = "F"
&#1093; = "KH"
&#1094; = "TS"
&#1095; = "CH"
&#1096; = "SH"
&#1097; = "SHCH"
&#1099; = "Y"
&#1101; = "E"
&#1102; = "YU"
&#1103; = "YA"
&#1066; = ""
&#1098; = ""
&#1068; = ""
&#1100; = ""
&#240; = "d"
&#208; = "D"
&#254; = "th"
&#222; = "TH"
&#7872; = "E"
&#7873; = "e"
&#7874; = "E"
&#7875; = "e"
&#7876; = "E"
&#7877; = "e"
&#7870; = "E"
&#7871; = "e"
&#7878; = "E"
&#7879; = "e"
&#7896; = "o"
&#7897; = "o"
&#416; = "o"
&#417; = "o"
&#431; = "U"
&#432; = "u"
&#7901; = ""
&#4304; = "a"
&#4305; = "b"
&#4306; = "g"
&#4307; = "d"
&#4308; = "e"
&#4309; = "v"
&#4310; = "z"
&#4311; = "t"
&#4312; = "i"
&#4313; = "k"
&#4314; = "l"
&#4315; = "m"
&#4316; = "n"
&#4317; = "o"
&#4318; = "p"
&#4319; = "zh"
&#4320; = "r"
&#4321; = "s"
&#4322; = "t"
&#4323; = "u"
&#4324; = "p"
&#4325; = "k"
&#4326; = "gh"
&#4327; = "q"
&#4328; = "sh"
&#4329; = "ch"
&#4330; = "ts"
&#4331; = "dz"
&#4332; = "ts"
&#4333; = "ch"
&#4334; = "x"
&#4335; = "j"
&#4336; = "h"
&#1489; = "b"
&#1490; = "g"
&#1491; = "d"
&#1492; = "h"
&#1493; = "w"
&#1494; = "z"
&#1495; = "h"
&#1496; = "t"
&#1497; = "y"
&#1499; = "k"
&#1500; = "l"
&#1502; = "m"
&#1504; = "n"
&#1505; = "s"
&#1508; = "p"
&#1510; = "c"
&#1511; = "q"
&#1512; = "r"
&#1513; = "j"
&#1514; = "t"
&#1377; = "a"
&#1378; = "b"
&#1379; = "g"
&#1380; = "d"
&#1381; = "e"
&#1382; = "z"
&#1383; = "e"
&#1384; = "e"
&#1385; = "t"
&#1386; = "z"
&#1387; = "i"
&#1388; = "l"
&#1389; = "x"
&#1390; = "c"
&#1391; = "k"
&#1392; = "h"
&#1393; = "j"
&#1394; = "g"
&#1395; = "c"
&#1396; = "m"
&#1397; = "y"
&#1398; = "n"
&#1399; = "s"
&#1400; = "o"
&#1401; = "c"
&#1402; = p""
&#1403; = "j"
&#1404; = "r"
&#1405; = "s"
&#1406; = "v"
&#1407; = "t"
&#1408; = "r"
&#1409; = "c"
&#1410; = "w"
&#1411; = p""
&#1412; = "k"
&#1413; = "o"
&#1414; = "f"
&#1400; = "ow"
&#1415; = "ew"

Όταν γίνεται αυτό όμως, τα ελληνικά μετατρέπονται σε greeklish.

Υπάρχει κανένα σωστό translit ή κάποια άλλη λύση; Γιατί βαρέθηκα να βλέπω διαμάντια... (και να'ταν αληθινά, πάει στο καλό...)


Άβαταρ μέλους
Simosmme
Δημοσιεύσεις: 240
Εγγραφή: 10 Νοέμ 2005 10:57
Επικοινωνία:

πρόβλημα με ελληνικούς χαρακτήρες σε script (διαμάντια prob)

Δημοσίευση από Simosmme » 13 Απρ 2010 22:54

featurify είναι script, το έχω στο site

χοντρικά tranlit είναι (νομίζω) ένα αρχείο με οδηγίες για την ανάγνωση των χαρακτήρων

Απάντηση

Επιστροφή στο “PHP έτοιμες εφαρμογές”

Μέλη σε σύνδεση

Μέλη σε αυτήν τη Δ. Συζήτηση: Δεν υπάρχουν εγγεγραμμένα μέλη και 1 επισκέπτης