mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-31 17:31:11 +02:00
eitd/edvbstring.cpp: add getCountryCodeDefaultMapping
Origin commit data
------------------
Branch: ni/coolstream
Commit: 68200158e4
Author: [CST] Focus <focus.cst@gmail.com>
Date: 2012-02-08 (Wed, 08 Feb 2012)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
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 )
|
||||
||(sscanf( line, "%d %d ISO%d", &tsid, &onid, &encoding ) == 3 && encoding == 6937 ) )
|
||||
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 )
|
||||
||(sscanf( line, "%d %d", &tsid, &onid ) == 2 ) )
|
||||
TransponderUseTwoCharMapping.insert((tsid<<16)|onid);
|
||||
@@ -41,6 +45,15 @@ int readEncodingFile()
|
||||
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/
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
int getCountryCodeDefaultMapping( const std::string &lang );
|
||||
|
||||
#endif // __E_STRING__
|
||||
|
Reference in New Issue
Block a user