After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 112831 - Does not open files with the Russian text in the coding distinct from utf, krash.
Does not open files with the Russian text in the coding distinct from utf, kr...
Status: RESOLVED FIXED
Product: gedit
Classification: Applications
Component: general
2.3.x
Other Linux
: Normal critical
: ---
Assigned To: Gedit maintainers
gedit QA volunteers
Depends on:
Blocks:
 
 
Reported: 2003-05-12 12:55 UTC by alexhack
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: 2.1/2.2


Attachments
gedit --debug log console (55.77 KB, image/png)
2003-05-12 12:57 UTC, alexhack
Details
Function will return NULL, and gedit then further will fall (46.01 KB, image/png)
2003-05-12 12:59 UTC, alexhack
Details

Description alexhack 2003-05-12 12:55:22 UTC
Does not open files with the Russian text in the coding distinct from utf,
sample koi8-r.

I apologize for bad English, it is autotranslation from Russian.
A situation I shall explain in pictures of a debugger.
At me LANG=ru_RU.KOI8-R.
Constant 'KOI8R' if her to correct on 'KOI8-R', is specified in structure
GeditEncoding in a file gedit-encodings.c
=> files open and gedit  does not fall.
Comment 1 alexhack 2003-05-12 12:57:24 UTC
Created attachment 16454 [details]
gedit --debug log console
Comment 2 alexhack 2003-05-12 12:59:53 UTC
Created attachment 16455 [details]
Function will return NULL, and gedit then further will fall
Comment 3 alexhack 2003-05-12 13:04:25 UTC
diff -rNu gedit-2.3.1.last/gedit/gedit-encodings.c
gedit-2.3.1/gedit/gedit-encodings.c                       ---
gedit-2.3.1.last/gedit/gedit-encodings.c    Sun May 11 22:44:45 2003 
                                   +++
gedit-2.3.1/gedit/gedit-encodings.c Fri May  9 19:04:13 2003         
                                   @@ -213,7 +213,7 @@               
                                                                     
       { GEDIT_ENCODING_JOHAB,                                       
                                                "JOHAB", N_("Korean")
},                                                                   
               { GEDIT_ENCODING_KOI8_R,                              
                                                   -    "KOI8R",
N_("Cyrillic") },                                                    
                         +    "KOI8-R", N_("Cyrillic") },            
                                                                   {
GEDIT_ENCODING_KOI8_U,                                               
                                       "KOI8U",
N_("Cyrillic/Ukrainian") },                                      

                           

                                                                     
                                        Having applied patch for
change of a constant all has earned this. Simply I offer to add one
more position, but with KOI8R.
Comment 4 Paolo Maggi 2003-05-12 14:32:09 UTC
Fixed in CVS HEAD.

2003-05-12  Paolo Maggi  <paolo.maggi@polito.it>

	* gedit-encodings.c: added a KOI8-R encoding (fixes bug #112831 -
	Does not open files with the Russian text in the coding distinct 
	from utf, krash. Patch by alexhack@inbox.ru)
Comment 5 alexhack 2003-05-13 08:02:22 UTC
On other system by the way this bug is not shown. (rh7.2+update to 7.3
and gcc-2.95) 

And the system normally shows the prevention(warning), that a file not
in UTF-8 to the coding.

It is possible, that it at me a problem with gcc-3.2.3. I have
compiled it(him) with such options, I can something not so have
specified also a subsystem of processing of mistakes in gedit ceases
to work normally.

Part from gcc32.spec 

export OPT_FLAGS="%(echo %{opt_flags} | %__sed -e 's/-fno-rtti//g' -e
's/-fno-exceptions//g')"

export CC="gcc" CFLAGS="$OPT_FLAGS" CXXFLAGS="$OPT_FLAGS"
XCFLAGS="$OPT_FLAGS" TCFLAGS="$OPT_FLAGS"

./configure --prefix=%{_prefix} --mandir=%{_mandir} \
--infodir=%{_infodir} --enable_shared --enable-threads=posix \
--disable-checking --host=%{_target_platform} --with-system-zlib \
--disable-nls --with-cpu=%{_target_cpu} --enable-__cxa_atexit