Forum

Questions and discussions

Geman language- problems with umlauts

Report any problems or bugs

Geman language- problems with umlauts

Postby soxin » Thu May 20, 2010 8:42 pm

Hello,

is there a possibilty to fix the ipct support with umlauts like ä,ü,ö and ß in the german language.

If i add with the bulkupload (or other upload with ipct support) pictures, the umlauts are presented as
Code: Select all
S�d
instead of
Code: Select all
Süd
.. the german word for "south".

Thank you for help...
Sorry for my english :)
soxin
 
Posts: 66
Joined: Mon Mar 22, 2010 2:28 pm
Location: Germany

Re: Geman language- problems with umlauts

Postby admin » Mon May 24, 2010 12:03 pm

Please resave the file in Notepad with the option "without BOM":
/admin/languages/german.php

I am sorry. It is my fault.
admin
Site Admin
 
Posts: 1465
Joined: Sun Mar 07, 2010 5:55 pm

Re: Geman language- problems with umlauts

Postby soxin » Tue May 25, 2010 6:25 am

Hello,

this is not the problem.

The problems are the iptc support if the pictures have "umlauts" like ä,ü,ö or ß
in the id3 tags, the script can't read this right.
Sorry for my english :)
soxin
 
Posts: 66
Joined: Mon Mar 22, 2010 2:28 pm
Location: Germany

Re: Geman language- problems with umlauts

Postby admin » Tue May 25, 2010 9:12 am

The script reads IPTC info in one text encode but the info may be in other encode. We will figure out...
admin
Site Admin
 
Posts: 1465
Joined: Sun Mar 07, 2010 5:55 pm

Re: Geman language- problems with umlauts

Postby soxin » Tue May 25, 2010 12:51 pm

thx .. :)
Sorry for my english :)
soxin
 
Posts: 66
Joined: Mon Mar 22, 2010 2:28 pm
Location: Germany

Re: Geman language- problems with umlauts

Postby soxin » Mon Jul 12, 2010 5:48 am

Any news? Thx
Sorry for my english :)
soxin
 
Posts: 66
Joined: Mon Mar 22, 2010 2:28 pm
Location: Germany

Re: Geman language- problems with umlauts

Postby admin » Mon Jul 12, 2010 7:18 am

The photo IPTC info must be in utf8 encode.
admin
Site Admin
 
Posts: 1465
Joined: Sun Mar 07, 2010 5:55 pm

Re: Geman language- problems with umlauts

Postby soxin » Thu Aug 12, 2010 6:30 am

Hello again,

i have change now the code in the script, now it works! :P
What i change?

Open: /admin/bulk_upload/photo_upload.php

~line 125

old code:
Code: Select all
//IPTC support
if($photo!="")
{
$size = @getimagesize ($_SERVER["DOCUMENT_ROOT"].$photo,&$info);
if(isset ($info["APP13"]))
{
$iptc = iptcparse ($info["APP13"]);



//Title
if(isset($iptc["2#005"][0]) and $iptc["2#005"][0]!="")
{
$sql="update photos set title='".result($iptc["2#005"][0])."' where id_parent=".$id;
$db->execute($sql);

$sql="update structure set name='".result($iptc["2#005"][0])."' where id=".$id;
$db->execute($sql);
}


//Description
if(isset($iptc["2#120"][0]) and $iptc["2#120"][0]!="")
{
$sql="update photos set description='".result($iptc["2#120"][0])."' where id_parent=".$id;
$db->execute($sql);
}

//Keywords
if(isset($iptc["2#025"][0]) and $iptc["2#025"][0]!="")
{
$iptc_kw="";
for($t=0;$t<count($iptc["2#025"]);$t++)
{
if($iptc_kw!=""){$iptc_kw.=",";}
$iptc_kw.=$iptc["2#025"][$t];
}
if($iptc_kw!="")
{
$sql="update photos set keywords='".result($iptc_kw)."' where id_parent=".$id;
$db->execute($sql);
}
}

}
}


new code:
Code: Select all
//IPTC support
if($photo!="")
{
$size = @getimagesize ($_SERVER["DOCUMENT_ROOT"].$photo,&$info);
if(isset ($info["APP13"]))
{
$iptc = iptcparse ($info["APP13"]);


//Title
if(isset($iptc["2#005"][0]) and $iptc["2#005"][0]!="")
{
$title2  = utf8_encode(html_entity_decode(result($iptc["2#005"][0]), ENT_NOQUOTES));
$sql="update photos set title='".$title2."' where id_parent=".$id;
$db->execute($sql);

$sql="update structure set name='".$title2."' where id=".$id;
$db->execute($sql);
}


//Description
if(isset($iptc["2#120"][0]) and $iptc["2#120"][0]!="")
{
$desc2=utf8_encode(html_entity_decode(result($iptc["2#120"][0]), ENT_NOQUOTES));

$sql="update photos set description='".$desc2."' where id_parent=".$id;
$db->execute($sql);
}

//Keywords
if(isset($iptc["2#025"][0]) and $iptc["2#025"][0]!="")
{

$iptc_kw="";
for($t=0;$t<count($iptc["2#025"]);$t++)
{
if($iptc_kw!=""){$iptc_kw.=",";}
$iptc_kw.=$iptc["2#025"][$t];
}
if($iptc_kw!="")
{
$keyw2=utf8_encode(html_entity_decode(result($iptc_kw), ENT_NOQUOTES));
$sql="update photos set keywords='".$keyw2."' where id_parent=".$id;
$db->execute($sql);
}
}

}
}
Sorry for my english :)
soxin
 
Posts: 66
Joined: Mon Mar 22, 2010 2:28 pm
Location: Germany

Re: Geman language- problems with umlauts

Postby admin » Thu Aug 12, 2010 7:28 am

Thanks for the solution.
admin
Site Admin
 
Posts: 1465
Joined: Sun Mar 07, 2010 5:55 pm

Re: Geman language- problems with umlauts

Postby jens » Mon Aug 16, 2010 7:39 am

Hi,

Thanks for this soluttion, but unfortunately this didn't solve the umlaut-problem for me? Maybe, there are some other files which have to be changed?

best regards,
jens
jens
 
Posts: 4
Joined: Thu Aug 12, 2010 2:01 pm

Next

Return to Bugs & Troubleshooting

Who is online

Users browsing this forum: No registered users and 1 guest

cron
  Photo Store Script

Professional php photo stock script and WordPress plug-in for photographers and video producers.

  Support
  CMSaccount Inc.