If I click on Source List or Place Hierarchy the places and sources are sorted wrong the places and sources that starts with the swedish letters , or are in the beginning of the list. Could I somehow fix this myself? Could someone help me solve the problem?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I do not no the utf-8 format but they are sorted wrong in ascii to if you don't take care of them seperatly. They should be sorted like this if there is someone who can fix it (I don't who to program php) X Y Z
Regards
Patrik
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The same thing happens with the Danish character, and I guess it happens with all the socalled foreign characters.
Question is, if it doesn't involve overly complicated coding to meet all the specific and different sorting order used in all the different countries around the world ?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2003-12-17
Could the correct way to solve this problem be to when you import the gedcom convert it from utf8 to
iso-8859-1 and then insert the data into the database because in the functions_mysql.php they already ORDER in the SELECT statements. and when yoy fetch the data forpresentation you convert it back to utf8 from iso-8859-1
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
When I tested this, the letters were properly sorted.
But I it appears that there is a MySQL problem. If I have surnames that start with A, , and . Clicking on A brings up the name for A, , and . To fix this, I had to add the BINARY flag to the SQL LIKE comparison in the get_alpha_indis and get_alpha_fams and check for both upper and lower case.
The new SQL statement looks like this:
$sql = "SELECT * FROM ".$TBLPREFIX."individuals WHERE (BINARY i_name LIKE '".addslashes(strtoupper($letter))."%' OR BINARY i_name LIKE '".addslashes(strtolower($letter))."%') AND i_file='$GEDCOM' ORDER BY i_name";
There were also some other bugs on the page that seem to have been introduced when going to XHTML. Clicking on an or other special character would bring up an empty list. I've fixed these errors in the CVS and will post a new beta version with these fixes later.
--John
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2003-12-18
Hi John
So you don't have the problem that I have with the sort order for the swedish letters and in the source list and places? I also have the problem you describing that Clicking on A brings up the name for A, , and and . In what file is this SQl statment that fix this problem?
If you want to you could take a look att my page to see that the sort order is wrong fr the letters . Maybe the new release of MySql will solve the problem? One of its feauters is better support for utf-8?. If I'm running this SQL query in phpMyAdmin
SELECT *
FROM `pgv_sources`
WHERE 1
ORDER BY `s_name` LIMIT 0 , 30
I get the result sorted wrong see below
Database : phpgedview
Generation Time: Dec 18, 2003 at 12:39 PM
Generated by: phpMyAdmin 2.5.4
SQL-query: SELECT * FROM `pgv_sources` WHERE 1 ORDER BY `s_name` LIMIT 0, 30;
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2003-12-18
clarification
in this line:
S158 Anor.ged Å AII:3 sid 126 0 @S158@ SOUR
it's the swedish
and in this line it's the swedish
S157 Anor.ged Ö Eneby AI:1 sid 256(GL142) 0 @S157@ SOUR
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2003-12-19
Does anyone have an idea?
I'm exprementing with this problem on a Sun with apache2 and MySql 4.1.1alpha which should support utf8.
But we're getting alot of error when we're trying to import the gedcomfile. only 3 tables are created the error message is
SQL-query :
CREATE TABLE `pgv_families` (
`f_id` varchar( 30 ) default NULL ,
`f_file` varchar( 255 ) default NULL ,
`f_name` varchar( 255 ) default NULL ,
`f_husb` varchar( 30 ) default NULL ,
`f_wife` varchar( 30 ) default NULL ,
`f_chil` varchar( 255 ) default NULL ,
`f_gedcom` text,
KEY `index_id` ( `f_id` ) ,
KEY `index_name` ( `f_name` ) ) TYPE = MYISAM
MySQL sa:
#1071 - Specified key was too long. Max key length is 500
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
If I click on Source List or Place Hierarchy the places and sources are sorted wrong the places and sources that starts with the swedish letters , or are in the beginning of the list. Could I somehow fix this myself? Could someone help me solve the problem?
I do not no the utf-8 format but they are sorted wrong in ascii to if you don't take care of them seperatly. They should be sorted like this if there is someone who can fix it (I don't who to program php) X Y Z
Regards
Patrik
The same thing happens with the Danish character, and I guess it happens with all the socalled foreign characters.
Question is, if it doesn't involve overly complicated coding to meet all the specific and different sorting order used in all the different countries around the world ?
best regard
Arne
ps. Danish sorting order has to be:
ABCDEFGHIJKLMNOPQRSTUVWXYZ
abcdefghijklmnopqrstuvwxyz
Could the correct way to solve this problem be to when you import the gedcom convert it from utf8 to
iso-8859-1 and then insert the data into the database because in the functions_mysql.php they already ORDER in the SELECT statements. and when yoy fetch the data forpresentation you convert it back to utf8 from iso-8859-1
But PHP's sort order is not charset-dependant.
When I tested this, the letters were properly sorted.
But I it appears that there is a MySQL problem. If I have surnames that start with A, , and . Clicking on A brings up the name for A, , and . To fix this, I had to add the BINARY flag to the SQL LIKE comparison in the get_alpha_indis and get_alpha_fams and check for both upper and lower case.
The new SQL statement looks like this:
$sql = "SELECT * FROM ".$TBLPREFIX."individuals WHERE (BINARY i_name LIKE '".addslashes(strtoupper($letter))."%' OR BINARY i_name LIKE '".addslashes(strtolower($letter))."%') AND i_file='$GEDCOM' ORDER BY i_name";
There were also some other bugs on the page that seem to have been introduced when going to XHTML. Clicking on an or other special character would bring up an empty list. I've fixed these errors in the CVS and will post a new beta version with these fixes later.
--John
Hi John
So you don't have the problem that I have with the sort order for the swedish letters and in the source list and places? I also have the problem you describing that Clicking on A brings up the name for A, , and and . In what file is this SQl statment that fix this problem?
If you want to you could take a look att my page to see that the sort order is wrong fr the letters . Maybe the new release of MySql will solve the problem? One of its feauters is better support for utf-8?. If I'm running this SQL query in phpMyAdmin
SELECT *
FROM `pgv_sources`
WHERE 1
ORDER BY `s_name` LIMIT 0 , 30
I get the result sorted wrong see below
Database : phpgedview
Generation Time: Dec 18, 2003 at 12:39 PM
Generated by: phpMyAdmin 2.5.4
SQL-query: SELECT * FROM `pgv_sources` WHERE 1 ORDER BY `s_name` LIMIT 0, 30;
s_id s_file s_name s_gedcom
S4 Anor.ged Arthur anteckningar 0 @S4@ SOUR
1 ABBR Arthur anteckningar
S158 Anor.ged Å AII:3 sid 126 0 @S158@ SOUR
1 ABBR Å AII:3 sid 126
S167 Anor.ged Ålder vid barnafödande. 0 @S167@ SOUR
1 ABBR Ålder vid barnafödande.
S157 Anor.ged Ö Eneby AI:1 sid 256(GL142) 0 @S157@ SOUR
1 ABBR Ö Eneby AI:1 sid 256(GL142)
S170 Anor.ged Ö Eneby AI:1 sid 459(GL246) 0 @S170@ SOUR
1 ABBR Ö Eneby AI:1 sid 459(GL246)
S171 Anor.ged Ö Eneby AI:2 sid 133(GL73) 0 @S171@ SOUR
1 ABBR Ö Eneby AI:2 sid 133(GL73)
S162 Anor.ged Ö Eneby AI:3sid 168(GL169) 0 @S162@ SOUR
1 ABBR Ö Eneby AI:3sid 168(GL169)
S156 Anor.ged Ö Eneby C:2 sid 304(GL164) 0 @S156@ SOUR
1 ABBR Ö Eneby C:2 sid 304(GL164)
S163 Anor.ged Ö Eneby C:3 sid 566 GL300) 0 @S163@ SOUR
1 ABBR Ö Eneby C:3 sid 566 GL300)
clarification
in this line:
S158 Anor.ged Å AII:3 sid 126 0 @S158@ SOUR
it's the swedish
and in this line it's the swedish
S157 Anor.ged Ö Eneby AI:1 sid 256(GL142) 0 @S157@ SOUR
Sorry forgot the adress
http://runo.mine.nu:81/phpGedView
Does anyone have an idea?
I'm exprementing with this problem on a Sun with apache2 and MySql 4.1.1alpha which should support utf8.
But we're getting alot of error when we're trying to import the gedcomfile. only 3 tables are created the error message is
SQL-query :
CREATE TABLE `pgv_families` (
`f_id` varchar( 30 ) default NULL ,
`f_file` varchar( 255 ) default NULL ,
`f_name` varchar( 255 ) default NULL ,
`f_husb` varchar( 30 ) default NULL ,
`f_wife` varchar( 30 ) default NULL ,
`f_chil` varchar( 255 ) default NULL ,
`f_gedcom` text,
KEY `index_id` ( `f_id` ) ,
KEY `index_name` ( `f_name` ) ) TYPE = MYISAM
MySQL sa:
#1071 - Specified key was too long. Max key length is 500
Try adding a number after the key like this:
KEY `index_id` ( `f_id`, 5 ) ,
KEY `index_name` ( `f_name`, 10 )
--John
I have found an explantion it's a bug in MySql 4.1.1
see this link
http://bugs.mysql.com/bug.php?id=2130