Skip to content

Commit

Permalink
Add support for UTF8 to XDMoD
Browse files Browse the repository at this point in the history
  • Loading branch information
jpwhite4 committed Nov 26, 2024
1 parent 77a0b94 commit e805cf9
Show file tree
Hide file tree
Showing 223 changed files with 246 additions and 233 deletions.
4 changes: 2 additions & 2 deletions classes/ETL/DbModel/Table.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ class Table extends SchemaEntity implements iEntity, iDiscoverableEntity, iAlter
'engine' => null,

// Optional table default character set
'charset' => null,
'charset' => 'utf8',

// Optional table collation
'collation' => null,
'collation' => 'utf8_unicode_ci',

// Associative array where the keys are column names and the values are Column objects
'columns' => array(),
Expand Down
3 changes: 0 additions & 3 deletions classes/OpenXdmod/Shredder/Slurm.php
Original file line number Diff line number Diff line change
Expand Up @@ -295,9 +295,6 @@ public function shredLine($line)
return;
}

// Convert job name encoding.
$job['job_name'] = mb_convert_encoding($job['job_name'], 'ISO-8859-1', 'UTF-8');

// Convert datetime strings into unix timestamps.
$dateKeys = array(
'submit_time',
Expand Down
4 changes: 2 additions & 2 deletions configuration/etl/etl_tables.d/logger/log_level.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"schema": "mod_logger",
"name": "log_level",
"engine": "InnoDB",
"charset": "latin1",
"collation": "latin1_swedish_ci",
"charset": "utf8",
"collation": "utf8_unicode_ci",
"columns": [
{
"name": "log_level_id",
Expand Down
4 changes: 2 additions & 2 deletions configuration/etl/etl_tables.d/logger/log_table.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"schema": "mod_logger",
"name": "log_table",
"engine": "InnoDB",
"charset": "latin1",
"collation": "latin1_swedish_ci",
"charset": "utf8",
"collation": "utf8_unicode_ci",
"columns": [
{
"name": "id",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
{
"id": 4,
"person_id": "1",
"person_name": "Accentor, Alpine"
"person_name": "Accentor, Alpiné"
},
{
"id": 5,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,22 @@
"table_definition": {
"name": "modify_table_test",
"engine": "MyISAM",
"charset": "latin1",
"collation": "latin1_swedish_ci",
"columns": [
{
"#": "New column at start of list",
"name": "new_column_1",
"type": "varchar(40)",
"charset": "latin1",
"collation": "latin1_swedish_ci",
"nullable": true
},
{
"name": "resource",
"type": "varchar(40)",
"charset": "latin1",
"collation": "latin1_swedish_ci",
"nullable": true
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,22 @@
"table_definition": {
"name": "modify_table_test",
"engine": "MyISAM",
"charset": "latin1",
"collation": "latin1_swedish_ci",
"columns": [
{
"name": "resource",
"type": "varchar(40)",
"charset": "latin1",
"collation": "latin1_swedish_ci",
"nullable": true
},
{
"#": "This was the 1st column",
"name": "new_column_1",
"type": "varchar(40)",
"charset": "latin1",
"collation": "latin1_swedish_ci",
"nullable": true
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,21 @@
"table_definition": {
"name": "modify_table_test",
"engine": "MyISAM",
"charset": "latin1",
"collation": "latin1_swedish_ci",
"columns": [
{
"name": "resource",
"type": "varchar(40)",
"charset": "latin1",
"collation": "latin1_swedish_ci",
"nullable": true
},
{
"name": "new_column_1",
"type": "varchar(40)",
"charset": "latin1",
"collation": "latin1_swedish_ci",
"nullable": true
},
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"comment": "",
"engine": "myisam",
"charset": "latin1",
"collation": "latin1_swedish_ci",
"charset": "utf8",
"collation": "utf8_unicode_ci",
"columns": [
{
"type": "varchar(40)",
"charset": "latin1",
"collation": "latin1_swedish_ci",
"charset": "utf8",
"collation": "utf8_unicode_ci",
"nullable": true,
"default": null,
"extra": null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ CREATE TABLE IF NOT EXISTS `resourceallocationfact_by_quarter` (
INDEX `index_year` (`year`),
INDEX `index_organization_id` (`organization_id`),
INDEX `index_resource_id` (`resource_id`)
) ENGINE = myisam COMMENT = 'Resource Allocation facts aggregated by quarter.';
) ENGINE = myisam CHARSET = utf8 COLLATE = utf8_unicode_ci COMMENT = 'Resource Allocation facts aggregated by quarter.';
2 changes: 1 addition & 1 deletion tests/artifacts/xdmod/referencedata/names.csv
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,7 @@ refbl,Red-flanked,Bluetail
caspl,Caspian,Plover
egrhula,Snowy,Egret
whtsp,White-throated,Sparrow
alpac,Alpine,Accentor
alpac,Alpiné,Accentor
allga,Allen's,Gallinule
glwgu,Glaucous-winged,Gull
rolle,,Roller
Expand Down
4 changes: 2 additions & 2 deletions tests/artifacts/xdmod/regression/chartFilterTests.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,12 @@
"date": "2016-12-31",
"filter_dimension": "pi",
"filter_values": [
"Accentor, Alpine",
"Accentor, Alpiné",
"Bittern"
]
},
"expected": {
"subtitle": "PI = ( Accentor, Alpine, Bittern )",
"subtitle": "PI = ( Accentor, Alpiné, Bittern )",
"yvalue": 3499.8997
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Fulmar,2
"Shearwater, Balearic",2
"Warbler, Cetti's",2
"Warbler, Hooded",2
"Accentor, Alpine",1
"Accentor, Alpiné",1
Bittern,1
Blackbird,1
"Bluetail, Red-flanked",1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Fulmar,2
"Shearwater, Balearic",2
"Warbler, Cetti's",2
"Warbler, Hooded",2
"Accentor, Alpine",1
"Accentor, Alpiné",1
Bittern,1
Blackbird,1
"Bluetail, Red-flanked",1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Fulmar,2
"Shearwater, Balearic",2
"Warbler, Cetti's",2
"Warbler, Hooded",2
"Accentor, Alpine",1
"Accentor, Alpiné",1
Bittern,1
Blackbird,1
"Bluetail, Red-flanked",1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Fulmar,2
"Shearwater, Balearic",2
"Warbler, Cetti's",2
"Warbler, Hooded",2
"Accentor, Alpine",1
"Accentor, Alpiné",1
Bittern,1
Blackbird,1
"Bluetail, Red-flanked",1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ parameters
start,end
2016-12-22,2017-01-01
---------
Day,"[Tern, Caspian] Number of Users: Active","[Fieldfare] Number of Users: Active","[Lark, Calandra] Number of Users: Active","[White, Great] Number of Users: Active","[Dowitcher, Short-billed] Number of Users: Active","[Jackdaw] Number of Users: Active","[Chaffinch] Number of Users: Active","[Flycatcher, Taiga] Number of Users: Active","[Fulmar] Number of Users: Active","[Scaup, Lesser] Number of Users: Active","[Shearwater, Balearic] Number of Users: Active","[Warbler, Cetti's] Number of Users: Active","[Warbler, Hooded] Number of Users: Active","[Accentor, Alpine] Number of Users: Active","[Bittern] Number of Users: Active","[Blackbird] Number of Users: Active","[Bluetail, Red-flanked] Number of Users: Active","[Bufflehead] Number of Users: Active","[Bunting, Ortolan] Number of Users: Active","[Chiffchaff, Iberian] Number of Users: Active","[Dotterel] Number of Users: Active","[Dunlin] Number of Users: Active","[Egret, Snowy] Number of Users: Active","[Goose, Red-breasted] Number of Users: Active","[Gull, Glaucous-winged] Number of Users: Active","[Gull, Yellow-legged] Number of Users: Active","[Harrier, Hen] Number of Users: Active","[Kestrel, Lesser] Number of Users: Active","[Martin, Sand] Number of Users: Active","[Moorhen] Number of Users: Active","[Nuthatch] Number of Users: Active","[Petrel, Fea's] Number of Users: Active","[Shearwater, Great] Number of Users: Active","[Shearwater, Macaronesian] Number of Users: Active","[Smew] Number of Users: Active","[Spotted, Great] Number of Users: Active","[Swift, Little] Number of Users: Active","[Thrush, Hermit] Number of Users: Active","[Warbler, Blackpoll] Number of Users: Active","[Warbler, Savi's] Number of Users: Active","[Yellowthroat, Common] Number of Users: Active"
Day,"[Tern, Caspian] Number of Users: Active","[Fieldfare] Number of Users: Active","[Lark, Calandra] Number of Users: Active","[White, Great] Number of Users: Active","[Dowitcher, Short-billed] Number of Users: Active","[Jackdaw] Number of Users: Active","[Chaffinch] Number of Users: Active","[Flycatcher, Taiga] Number of Users: Active","[Fulmar] Number of Users: Active","[Scaup, Lesser] Number of Users: Active","[Shearwater, Balearic] Number of Users: Active","[Warbler, Cetti's] Number of Users: Active","[Warbler, Hooded] Number of Users: Active","[Accentor, Alpiné] Number of Users: Active","[Bittern] Number of Users: Active","[Blackbird] Number of Users: Active","[Bluetail, Red-flanked] Number of Users: Active","[Bufflehead] Number of Users: Active","[Bunting, Ortolan] Number of Users: Active","[Chiffchaff, Iberian] Number of Users: Active","[Dotterel] Number of Users: Active","[Dunlin] Number of Users: Active","[Egret, Snowy] Number of Users: Active","[Goose, Red-breasted] Number of Users: Active","[Gull, Glaucous-winged] Number of Users: Active","[Gull, Yellow-legged] Number of Users: Active","[Harrier, Hen] Number of Users: Active","[Kestrel, Lesser] Number of Users: Active","[Martin, Sand] Number of Users: Active","[Moorhen] Number of Users: Active","[Nuthatch] Number of Users: Active","[Petrel, Fea's] Number of Users: Active","[Shearwater, Great] Number of Users: Active","[Shearwater, Macaronesian] Number of Users: Active","[Smew] Number of Users: Active","[Spotted, Great] Number of Users: Active","[Swift, Little] Number of Users: Active","[Thrush, Hermit] Number of Users: Active","[Warbler, Blackpoll] Number of Users: Active","[Warbler, Savi's] Number of Users: Active","[Yellowthroat, Common] Number of Users: Active"
2016-12-22,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
2016-12-23,1,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
2016-12-24,1,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ parameters
start,end
2016-12-22,2017-01-01
---------
Month,"[Tern, Caspian] Number of Users: Active","[Fieldfare] Number of Users: Active","[Lark, Calandra] Number of Users: Active","[White, Great] Number of Users: Active","[Dowitcher, Short-billed] Number of Users: Active","[Jackdaw] Number of Users: Active","[Chaffinch] Number of Users: Active","[Flycatcher, Taiga] Number of Users: Active","[Fulmar] Number of Users: Active","[Scaup, Lesser] Number of Users: Active","[Shearwater, Balearic] Number of Users: Active","[Warbler, Cetti's] Number of Users: Active","[Warbler, Hooded] Number of Users: Active","[Accentor, Alpine] Number of Users: Active","[Bittern] Number of Users: Active","[Blackbird] Number of Users: Active","[Bluetail, Red-flanked] Number of Users: Active","[Bufflehead] Number of Users: Active","[Bunting, Ortolan] Number of Users: Active","[Chiffchaff, Iberian] Number of Users: Active","[Dotterel] Number of Users: Active","[Dunlin] Number of Users: Active","[Egret, Snowy] Number of Users: Active","[Goose, Red-breasted] Number of Users: Active","[Gull, Glaucous-winged] Number of Users: Active","[Gull, Yellow-legged] Number of Users: Active","[Harrier, Hen] Number of Users: Active","[Kestrel, Lesser] Number of Users: Active","[Martin, Sand] Number of Users: Active","[Moorhen] Number of Users: Active","[Nuthatch] Number of Users: Active","[Petrel, Fea's] Number of Users: Active","[Shearwater, Great] Number of Users: Active","[Shearwater, Macaronesian] Number of Users: Active","[Smew] Number of Users: Active","[Spotted, Great] Number of Users: Active","[Swift, Little] Number of Users: Active","[Thrush, Hermit] Number of Users: Active","[Warbler, Blackpoll] Number of Users: Active","[Warbler, Savi's] Number of Users: Active","[Yellowthroat, Common] Number of Users: Active"
Month,"[Tern, Caspian] Number of Users: Active","[Fieldfare] Number of Users: Active","[Lark, Calandra] Number of Users: Active","[White, Great] Number of Users: Active","[Dowitcher, Short-billed] Number of Users: Active","[Jackdaw] Number of Users: Active","[Chaffinch] Number of Users: Active","[Flycatcher, Taiga] Number of Users: Active","[Fulmar] Number of Users: Active","[Scaup, Lesser] Number of Users: Active","[Shearwater, Balearic] Number of Users: Active","[Warbler, Cetti's] Number of Users: Active","[Warbler, Hooded] Number of Users: Active","[Accentor, Alpiné] Number of Users: Active","[Bittern] Number of Users: Active","[Blackbird] Number of Users: Active","[Bluetail, Red-flanked] Number of Users: Active","[Bufflehead] Number of Users: Active","[Bunting, Ortolan] Number of Users: Active","[Chiffchaff, Iberian] Number of Users: Active","[Dotterel] Number of Users: Active","[Dunlin] Number of Users: Active","[Egret, Snowy] Number of Users: Active","[Goose, Red-breasted] Number of Users: Active","[Gull, Glaucous-winged] Number of Users: Active","[Gull, Yellow-legged] Number of Users: Active","[Harrier, Hen] Number of Users: Active","[Kestrel, Lesser] Number of Users: Active","[Martin, Sand] Number of Users: Active","[Moorhen] Number of Users: Active","[Nuthatch] Number of Users: Active","[Petrel, Fea's] Number of Users: Active","[Shearwater, Great] Number of Users: Active","[Shearwater, Macaronesian] Number of Users: Active","[Smew] Number of Users: Active","[Spotted, Great] Number of Users: Active","[Swift, Little] Number of Users: Active","[Thrush, Hermit] Number of Users: Active","[Warbler, Blackpoll] Number of Users: Active","[Warbler, Savi's] Number of Users: Active","[Yellowthroat, Common] Number of Users: Active"
2016-12,6,4,4,4,3,3,2,2,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
2017-01,2,3,4,3,3,2,2,2,1,1,0,0,1,1,1,0,1,1,1,1,0,1,1,1,0,1,0,1,1,1,0,0,0,0,0,0,1,0,0,0,0
---------
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ parameters
start,end
2016-12-22,2017-01-01
---------
Quarter,"[Tern, Caspian] Number of Users: Active","[Fieldfare] Number of Users: Active","[Lark, Calandra] Number of Users: Active","[White, Great] Number of Users: Active","[Dowitcher, Short-billed] Number of Users: Active","[Jackdaw] Number of Users: Active","[Chaffinch] Number of Users: Active","[Flycatcher, Taiga] Number of Users: Active","[Fulmar] Number of Users: Active","[Scaup, Lesser] Number of Users: Active","[Shearwater, Balearic] Number of Users: Active","[Warbler, Cetti's] Number of Users: Active","[Warbler, Hooded] Number of Users: Active","[Accentor, Alpine] Number of Users: Active","[Bittern] Number of Users: Active","[Blackbird] Number of Users: Active","[Bluetail, Red-flanked] Number of Users: Active","[Bufflehead] Number of Users: Active","[Bunting, Ortolan] Number of Users: Active","[Chiffchaff, Iberian] Number of Users: Active","[Dotterel] Number of Users: Active","[Dunlin] Number of Users: Active","[Egret, Snowy] Number of Users: Active","[Goose, Red-breasted] Number of Users: Active","[Gull, Glaucous-winged] Number of Users: Active","[Gull, Yellow-legged] Number of Users: Active","[Harrier, Hen] Number of Users: Active","[Kestrel, Lesser] Number of Users: Active","[Martin, Sand] Number of Users: Active","[Moorhen] Number of Users: Active","[Nuthatch] Number of Users: Active","[Petrel, Fea's] Number of Users: Active","[Shearwater, Great] Number of Users: Active","[Shearwater, Macaronesian] Number of Users: Active","[Smew] Number of Users: Active","[Spotted, Great] Number of Users: Active","[Swift, Little] Number of Users: Active","[Thrush, Hermit] Number of Users: Active","[Warbler, Blackpoll] Number of Users: Active","[Warbler, Savi's] Number of Users: Active","[Yellowthroat, Common] Number of Users: Active"
Quarter,"[Tern, Caspian] Number of Users: Active","[Fieldfare] Number of Users: Active","[Lark, Calandra] Number of Users: Active","[White, Great] Number of Users: Active","[Dowitcher, Short-billed] Number of Users: Active","[Jackdaw] Number of Users: Active","[Chaffinch] Number of Users: Active","[Flycatcher, Taiga] Number of Users: Active","[Fulmar] Number of Users: Active","[Scaup, Lesser] Number of Users: Active","[Shearwater, Balearic] Number of Users: Active","[Warbler, Cetti's] Number of Users: Active","[Warbler, Hooded] Number of Users: Active","[Accentor, Alpiné] Number of Users: Active","[Bittern] Number of Users: Active","[Blackbird] Number of Users: Active","[Bluetail, Red-flanked] Number of Users: Active","[Bufflehead] Number of Users: Active","[Bunting, Ortolan] Number of Users: Active","[Chiffchaff, Iberian] Number of Users: Active","[Dotterel] Number of Users: Active","[Dunlin] Number of Users: Active","[Egret, Snowy] Number of Users: Active","[Goose, Red-breasted] Number of Users: Active","[Gull, Glaucous-winged] Number of Users: Active","[Gull, Yellow-legged] Number of Users: Active","[Harrier, Hen] Number of Users: Active","[Kestrel, Lesser] Number of Users: Active","[Martin, Sand] Number of Users: Active","[Moorhen] Number of Users: Active","[Nuthatch] Number of Users: Active","[Petrel, Fea's] Number of Users: Active","[Shearwater, Great] Number of Users: Active","[Shearwater, Macaronesian] Number of Users: Active","[Smew] Number of Users: Active","[Spotted, Great] Number of Users: Active","[Swift, Little] Number of Users: Active","[Thrush, Hermit] Number of Users: Active","[Warbler, Blackpoll] Number of Users: Active","[Warbler, Savi's] Number of Users: Active","[Yellowthroat, Common] Number of Users: Active"
"2016 Q4",6,4,4,4,3,3,2,2,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
"2017 Q1",2,3,4,3,3,2,2,2,1,1,0,0,1,1,1,0,1,1,1,1,0,1,1,1,0,1,0,1,1,1,0,0,0,0,0,0,1,0,0,0,0
---------
Loading

0 comments on commit e805cf9

Please sign in to comment.