grub-devel.gnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] do not reset console font when running utils on Windows
@ 2013-12-27 17:42 Andrey Borzenkov
  2013-12-27 18:14 ` Vladimir 'φ-coder/phcoder' Serbinenko
  0 siblings, 1 reply; 3+ messages in thread
From: Andrey Borzenkov @ 2013-12-27 17:42 UTC (permalink / raw)
  To: grub-devel

This is not required as utilities provide just simple text output. This
avoids surprising unexpected change of window look'n'feel.

---
 grub-core/osdep/windows/init.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/grub-core/osdep/windows/init.c b/grub-core/osdep/windows/init.c
index 98c325c..629d785 100644
--- a/grub-core/osdep/windows/init.c
+++ b/grub-core/osdep/windows/init.c
@@ -30,6 +30,7 @@
 
 #include "progname.h"
 
+#ifndef GRUB_UTIL
 struct grub_windows_console_font_infoex {
   ULONG cbSize;
   DWORD nFont;
@@ -111,6 +112,7 @@ set_console_unicode_font (void)
 	func_SetConsoleFont (err_handle, 12);
     }
 }
+#endif
 
 static char *grub_util_base_directory;
 static char *locale_dir;
@@ -148,10 +150,12 @@ grub_util_host_init (int *argc __attribute__ ((unused)),
 {
   char *ptr;
 
+#infdef GRUB_UTIL
   SetConsoleOutputCP (CP_UTF8);
   SetConsoleCP (CP_UTF8);
 
   set_console_unicode_font ();
+#endif
 
 #if SIZEOF_TCHAR == 1
 
-- 
tg: (645ff63..) u/mingw/console-font (depends on: master)


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] do not reset console font when running utils on Windows
  2013-12-27 17:42 [PATCH] do not reset console font when running utils on Windows Andrey Borzenkov
@ 2013-12-27 18:14 ` Vladimir 'φ-coder/phcoder' Serbinenko
  2013-12-27 18:27   ` Andrey Borzenkov
  0 siblings, 1 reply; 3+ messages in thread
From: Vladimir 'φ-coder/phcoder' Serbinenko @ 2013-12-27 18:14 UTC (permalink / raw)
  To: grub-devel

[-- Attachment #1: Type: text/plain, Size: 1219 bytes --]

On 27.12.2013 18:42, Andrey Borzenkov wrote:
> This is not required as utilities provide just simple text output. This
> avoids surprising unexpected change of window look'n'feel.
> 
Without it windows is unable to output any character outside of default
character set.
> ---
>  grub-core/osdep/windows/init.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/grub-core/osdep/windows/init.c b/grub-core/osdep/windows/init.c
> index 98c325c..629d785 100644
> --- a/grub-core/osdep/windows/init.c
> +++ b/grub-core/osdep/windows/init.c
> @@ -30,6 +30,7 @@
>  
>  #include "progname.h"
>  
> +#ifndef GRUB_UTIL
>  struct grub_windows_console_font_infoex {
>    ULONG cbSize;
>    DWORD nFont;
> @@ -111,6 +112,7 @@ set_console_unicode_font (void)
>  	func_SetConsoleFont (err_handle, 12);
>      }
>  }
> +#endif
>  
>  static char *grub_util_base_directory;
>  static char *locale_dir;
> @@ -148,10 +150,12 @@ grub_util_host_init (int *argc __attribute__ ((unused)),
>  {
>    char *ptr;
>  
> +#infdef GRUB_UTIL
>    SetConsoleOutputCP (CP_UTF8);
>    SetConsoleCP (CP_UTF8);
>  
>    set_console_unicode_font ();
> +#endif
>  
>  #if SIZEOF_TCHAR == 1
>  
> 



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 291 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] do not reset console font when running utils on Windows
  2013-12-27 18:14 ` Vladimir 'φ-coder/phcoder' Serbinenko
@ 2013-12-27 18:27   ` Andrey Borzenkov
  0 siblings, 0 replies; 3+ messages in thread
From: Andrey Borzenkov @ 2013-12-27 18:27 UTC (permalink / raw)
  To: grub-devel

[-- Attachment #1: Type: text/plain, Size: 511 bytes --]

В Пт, 27/12/2013 в 19:14 +0100, Vladimir 'φ-coder/phcoder' Serbinenko
пишет:
> On 27.12.2013 18:42, Andrey Borzenkov wrote:
> > This is not required as utilities provide just simple text output. This
> > avoids surprising unexpected change of window look'n'feel.
> > 
> Without it windows is unable to output any character outside of default
> character set.

I was not able to make any grub utility to output anything beyond
standard English messages. Does l10n work for you on Windows?


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-12-27 18:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-27 17:42 [PATCH] do not reset console font when running utils on Windows Andrey Borzenkov
2013-12-27 18:14 ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-12-27 18:27   ` Andrey Borzenkov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).