mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-09-02 02:11:04 +02:00
eitd/edvbstring.cpp: add getCountryCodeDefaultMapping
Origin commit data
------------------
Commit: 68200158e4
Author: [CST] Focus <focus.cst@gmail.com>
Date: 2012-02-08 (Wed, 08 Feb 2012)
This commit is contained in:
@@ -31,6 +31,10 @@ int readEncodingFile()
|
|||||||
else if ( (sscanf( line, "0x%x 0x%x ISO%d", &tsid, &onid, &encoding ) == 3 && encoding == 6937 )
|
else if ( (sscanf( line, "0x%x 0x%x ISO%d", &tsid, &onid, &encoding ) == 3 && encoding == 6937 )
|
||||||
||(sscanf( line, "%d %d ISO%d", &tsid, &onid, &encoding ) == 3 && encoding == 6937 ) )
|
||(sscanf( line, "%d %d ISO%d", &tsid, &onid, &encoding ) == 3 && encoding == 6937 ) )
|
||||||
TransponderDefaultMapping[(tsid<<16)|onid]=64;
|
TransponderDefaultMapping[(tsid<<16)|onid]=64;
|
||||||
|
#if 0 // FIXME crash at stop if compiled with -g -ggb3 ???
|
||||||
|
else if ( sscanf( line, "%s ISO%d", countrycode, &encoding ) == 2 && encoding == 6937 )
|
||||||
|
CountryCodeDefaultMapping[countrycode] = 64;
|
||||||
|
#endif
|
||||||
else if ( (sscanf( line, "0x%x 0x%x", &tsid, &onid ) == 2 )
|
else if ( (sscanf( line, "0x%x 0x%x", &tsid, &onid ) == 2 )
|
||||||
||(sscanf( line, "%d %d", &tsid, &onid ) == 2 ) )
|
||(sscanf( line, "%d %d", &tsid, &onid ) == 2 ) )
|
||||||
TransponderUseTwoCharMapping.insert((tsid<<16)|onid);
|
TransponderUseTwoCharMapping.insert((tsid<<16)|onid);
|
||||||
@@ -41,6 +45,15 @@ int readEncodingFile()
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int getCountryCodeDefaultMapping( const std::string &lang )
|
||||||
|
{
|
||||||
|
std::map<std::string, int>::iterator it =
|
||||||
|
CountryCodeDefaultMapping.find(lang);
|
||||||
|
if ( it != CountryCodeDefaultMapping.end() )
|
||||||
|
return it->second;
|
||||||
|
return 1; // ISO8859-1 / Latin1
|
||||||
|
}
|
||||||
|
|
||||||
// 8859-x to ucs-16 coding tables. taken from www.unicode.org/Public/MAPPINGS/ISO8859/
|
// 8859-x to ucs-16 coding tables. taken from www.unicode.org/Public/MAPPINGS/ISO8859/
|
||||||
|
|
||||||
static unsigned long c88592[96]= {
|
static unsigned long c88592[96]= {
|
||||||
|
@@ -11,4 +11,6 @@ inline std::string stringDVBUTF8(const std::string &string, int table=0, int tsi
|
|||||||
return convertDVBUTF8((const char*)string.c_str(), string.length(), table, tsidonid);
|
return convertDVBUTF8((const char*)string.c_str(), string.length(), table, tsidonid);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int getCountryCodeDefaultMapping( const std::string &lang );
|
||||||
|
|
||||||
#endif // __E_STRING__
|
#endif // __E_STRING__
|
||||||
|
Reference in New Issue
Block a user