test: initialize locale in read_tags.c
This commit is contained in:
		| @@ -24,12 +24,17 @@ | ||||
| #include "pcm_volume.h" | ||||
| #include "tag_ape.h" | ||||
| #include "tag_id3.h" | ||||
| #include "config.h" | ||||
|  | ||||
| #include <glib.h> | ||||
|  | ||||
| #include <assert.h> | ||||
| #include <unistd.h> | ||||
|  | ||||
| #ifdef HAVE_LOCALE_H | ||||
| #include <locale.h> | ||||
| #endif | ||||
|  | ||||
| /** | ||||
|  * No-op dummy. | ||||
|  */ | ||||
| @@ -119,6 +124,11 @@ int main(int argc, char **argv) | ||||
| 	struct tag *tag; | ||||
| 	bool empty; | ||||
|  | ||||
| #ifdef HAVE_LOCALE_H | ||||
| 	/* initialize locale */ | ||||
| 	setlocale(LC_CTYPE,""); | ||||
| #endif | ||||
|  | ||||
| 	if (argc != 3) { | ||||
| 		g_printerr("Usage: read_tags DECODER FILE\n"); | ||||
| 		return 1; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Max Kellermann
					Max Kellermann