mirror of
				https://github.com/vdr-projects/vdr.git
				synced 2025-03-01 10:50:46 +00:00 
			
		
		
		
	Changed the I18nNormalizeLanguageCode() check to also allow blanks (and all other printable characters) in the language codes
This commit is contained in:
		@@ -2005,3 +2005,6 @@ Matthias Schwarzott <zzam@gentoo.org>
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
Martin Ostermann <martin@familie-ostermann.de>
 | 
					Martin Ostermann <martin@familie-ostermann.de>
 | 
				
			||||||
 for fixing processing the PDCDescriptor in 'libsi' on big endian systems
 | 
					 for fixing processing the PDCDescriptor in 'libsi' on big endian systems
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Boguslaw Juza <bogdan@uci.agh.edu.pl>
 | 
				
			||||||
 | 
					 for reporting that there are stations that use blanks in the language codes
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										5
									
								
								HISTORY
									
									
									
									
									
								
							
							
						
						
									
										5
									
								
								HISTORY
									
									
									
									
									
								
							@@ -4931,7 +4931,10 @@ Video Disk Recorder Revision History
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
- Official release.
 | 
					- Official release.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
2006-09-24: Version 1.4.3-1
 | 
					2006-10-07: Version 1.4.3-1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
- The function cThread::Cancel() now only sets 'running' to false and does not
 | 
					- The function cThread::Cancel() now only sets 'running' to false and does not
 | 
				
			||||||
  actually kill the thread if the special value -1 is given (suggested by Udo Richter).
 | 
					  actually kill the thread if the special value -1 is given (suggested by Udo Richter).
 | 
				
			||||||
 | 
					- Changed the I18nNormalizeLanguageCode() check to also allow blanks (and all other
 | 
				
			||||||
 | 
					  printable characters) in the language codes (thanks to Boguslaw Juza for reporting
 | 
				
			||||||
 | 
					  that there are stations that use blanks in these codes).
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										6
									
								
								i18n.c
									
									
									
									
									
								
							
							
						
						
									
										6
									
								
								i18n.c
									
									
									
									
									
								
							@@ -4,7 +4,7 @@
 | 
				
			|||||||
 * See the main source file 'vdr.c' for copyright information and
 | 
					 * See the main source file 'vdr.c' for copyright information and
 | 
				
			||||||
 * how to reach the author.
 | 
					 * how to reach the author.
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * $Id: i18n.c 1.282 2006/09/16 09:08:30 kls Exp $
 | 
					 * $Id: i18n.c 1.283 2006/10/07 12:18:10 kls Exp $
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * Translations provided by:
 | 
					 * Translations provided by:
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
@@ -6243,9 +6243,9 @@ int I18nLanguageIndex(const char *Code)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
const char *I18nNormalizeLanguageCode(const char *Code)
 | 
					const char *I18nNormalizeLanguageCode(const char *Code)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  if (Code[0] && !isalnum(Code[0]) || Code[1] && !isalnum(Code[1]) || Code[2] && !isalnum(Code[2])) {
 | 
					  if (Code[0] && !isprint(Code[0]) || Code[1] && !isprint(Code[1]) || Code[2] && !isprint(Code[2])) {
 | 
				
			||||||
     // ISO 639 language codes are defined as alphabetical characters, but digits are apparently
 | 
					     // ISO 639 language codes are defined as alphabetical characters, but digits are apparently
 | 
				
			||||||
     // also used, for instance for "2ch"
 | 
					     // also used, for instance for "2ch". There are even channels that use blank characters.
 | 
				
			||||||
     //dsyslog("invalid language code: '%s'", Code);
 | 
					     //dsyslog("invalid language code: '%s'", Code);
 | 
				
			||||||
     return "???";
 | 
					     return "???";
 | 
				
			||||||
     }
 | 
					     }
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user