--- ./po/POTFILES.in.intl_numbers	2006-04-30 16:31:42.000000000 +0430
+++ ./po/POTFILES.in	2006-09-26 11:29:15.000000000 +0330
@@ -12,3 +12,4 @@
 glib/gutf8.c
 glib/goption.c
 glib/gkeyfile.c
+glib/gstrfuncs.c
--- ./glib/gstrfuncs.c.intl_numbers	2006-06-05 20:08:04.000000000 +0430
+++ ./glib/gstrfuncs.c	2006-09-26 12:49:43.000000000 +0330
@@ -38,6 +38,7 @@
 #include <string.h>
 #include <locale.h>
 #include <errno.h>
+#include <math.h>		/* For HUGE_VAL */
 #include <ctype.h>		/* For tolower() */
 #if !defined (HAVE_STRSIGNAL) || !defined(NO_SYS_SIGLIST_DECL)
 #include <signal.h>
@@ -46,6 +47,7 @@
 #include "glib.h"
 #include "gprintf.h"
 #include "gprintfint.h"
+#include "glibintl.h"
 
 #include "galias.h"
 
@@ -242,6 +244,495 @@
   return concat;
 }
 
+/* These function are used to get numbering local information */
+gchar *
+get_local_zero_str ()
+{
+  /* Zero sign 
+   * Just one char
+   */
+  return _("0");
+}
+
+gchar *
+get_local_positive_str ()
+{
+  /* Positive sign 
+   * Can be multiple characters for input
+   * Only first char is used for output
+   */
+  return _("+");
+}
+
+gchar *
+get_local_negative_str ()
+{
+  /* Negative sign 
+   * Can be multiple characters for input
+   * Only first char is used for output
+   */
+  return _("-");
+}
+
+gchar *
+get_local_decimal_point_str ()
+{
+  /* Decimal point
+   * Can be multiple characters for input
+   * Only first char is used for output
+   */
+  return _(".");
+}
+
+gchar *
+get_local_exp_str ()
+{
+  /* Exponential indicator
+   * Just a string
+   */
+  return _("e");
+}
+
+gunichar
+get_local_zero_char ()
+{
+  gunichar zero = g_utf8_get_char_validated (get_local_zero_str (), -1);
+  g_assert (g_unichar_digit_value (zero) == 0);
+  return zero;
+}
+
+gunichar
+get_local_positive_char ()
+{
+  gunichar positive_sign = g_utf8_get_char_validated ( get_local_positive_str (), -1);
+  g_assert (positive_sign > 0);
+}
+
+gunichar
+get_local_negative_char ()
+{
+  gunichar negative_sign = g_utf8_get_char_validated (get_local_negative_str (), -1);
+  g_assert (negative_sign > 0);
+}
+
+gunichar
+get_local_decimal_point_char ()
+{
+  gunichar decimal_point = g_utf8_get_char_validated (get_local_decimal_point_str (), -1);
+  g_assert (decimal_point > 0);
+}
+
+static gdouble _pow10 (gint e)
+{
+  if (e == 0)
+    return 1.0;
+  else if (e == 1)
+    return 10.0;
+  else if (e == -1)
+    return 0.1;
+  else 
+  {
+    gdouble x = _pow10 (e / 2);
+    if (e % 2 == 0)
+      return x * x;
+   else if (e % 2 == 1)
+      return x * x * 10;
+   else 
+      return x * x / 10;
+  }
+}
+
+/**
+ * g_local_strtod:
+ * @nptr:    the string to convert to a numeric value.
+ * @endptr:  if non-%NULL, it returns the character after
+ *	   the last character used in the conversion.
+ *
+ * Converts a string to a #gdouble value.
+ * It will use the local number system to convert to convert local 
+ * string to number. Local number system information is gathered from available
+ * translations for '0', '+', '-', '.', and 'e'.
+ *
+ * This function is useful for software internationalization. This functions is
+ * not able to read the default English numbers if there is a non-english translation 
+ * available for your locale. It can be called inside #g_strtod function to make it 
+ * work for internationalized numbers.
+ *
+ * Return value: the #gdouble value.
+ **/
+gdouble 
+g_local_strtod (const gchar        *nptr,
+	        gchar              **endptr)
+{
+  g_return_val_if_fail (nptr != NULL, 0);
+  gboolean read_flag = FALSE;
+
+  gchar *p = nptr;
+  gunichar c = g_utf8_get_char_validated (p, -1); /* c always is the first character of p */
+
+  /* Skip Spaces in the beginning */
+  while (g_unichar_isspace (c))
+    {
+      p = g_utf8_next_char (p);
+      c = g_utf8_get_char_validated (p, -1);
+    }
+
+  /* Check for sign */
+  gchar *positive_signs = get_local_positive_str ();
+  gchar *negative_signs = get_local_negative_str ();
+  gint sign = 1;
+
+  if (c != 0 && g_utf8_strchr (positive_signs, -1, c) != NULL)
+  {
+    p = g_utf8_next_char (p);
+    c = g_utf8_get_char_validated (p, -1);
+  }
+  else if (c != 0 && g_utf8_strchr (negative_signs, -1, c) != NULL)
+    {
+      sign = -1;
+      p = g_utf8_next_char (p);
+      c = g_utf8_get_char_validated (p, -1);
+    }
+
+  /* Read numbers */
+  gunichar zero = get_local_zero_char ();
+  gchar *decimal_point = get_local_decimal_point_str ();
+  gboolean read_radix = FALSE;
+  gint e = -1;
+
+  while (c == zero || 
+	c != 0 && g_utf8_strchr (decimal_point, -1, c) != NULL)
+    {
+      if (g_utf8_strchr (decimal_point, -1, c) != NULL)
+	{
+	  if (read_flag == FALSE || read_radix == TRUE)
+	    break;
+	  read_radix = TRUE;
+	}
+      else
+	{
+	  read_flag = TRUE;
+          if (read_radix == TRUE)
+	    --e;
+	}
+
+      p = g_utf8_next_char (p);
+      c = g_utf8_get_char_validated (p, -1);
+
+    }
+
+  gchar *dig_start = p; /* Save the current place for second pass */
+  gboolean radix_state = read_radix; /* Save the radix status too */
+
+  while ((c >= zero && c < zero + 10) ||
+	 (c != 0 && g_utf8_strchr (decimal_point, -1, c) != NULL))
+    {
+      if (g_utf8_strchr (decimal_point, -1, c) != NULL)
+	{
+	  if (read_radix == TRUE)
+	    break;
+	  read_radix = TRUE;
+	}
+      else
+	{
+	  read_flag = TRUE;
+	  if (read_radix == FALSE)
+	    ++e;
+	}
+      p = g_utf8_next_char (p);
+      c = g_utf8_get_char_validated (p, -1);
+    }
+
+  /* Check if any digit is read */
+  if (read_flag == FALSE)
+  {
+      /* Standard requires endptr, errno, Return value to be as followed */
+      if (endptr != NULL)
+	*endptr = nptr;
+      errno = EINVAL;
+      return 0;
+  }
+
+  /* Check for decimal exponent */
+  gchar *exp = get_local_exp_str ();
+  if (g_str_has_prefix (p, exp))
+    {
+      gchar *p2;
+      gint e2 = g_local_strtoll (p + strlen(exp), &p2, 10);
+      if (errno == 0)
+        {
+          p = p2;
+          c = g_utf8_get_char_validated (p, -1); 
+          e += e2;
+        }
+    }
+
+  /* Set The endptr */
+  if (endptr != NULL)
+    *endptr = p;
+
+  gdouble val = 0;
+  p = dig_start;	/* restore the value */
+  read_radix = radix_state; /* restore the radix state */
+  c = g_utf8_get_char_validated (p, -1);
+
+  if (e > 308) /* No way infinite! */
+  {
+    errno = ERANGE;
+    return sign == 1 ? HUGE_VAL : -HUGE_VAL;
+  }
+  
+  gdouble persision = _pow10 (e);
+  /* Read numbers */
+  while ((c >= zero && c < zero + 10) || 
+	 (c != 0 && g_utf8_strchr (decimal_point, -1, c) != NULL))
+  {
+    if (c != 0 && g_utf8_strchr (decimal_point, -1, c) != NULL)
+      {
+	if (read_radix == TRUE)
+	  break;
+	else
+	  read_radix = TRUE;
+      }
+    else
+      {
+	val = val + persision * (c - zero);
+	persision /= 10;
+      }
+    p = g_utf8_next_char (p);
+    c = g_utf8_get_char_validated (p, -1);
+
+  }
+  /* If the value is Inf or -Inf error should be reported */
+  if (val == HUGE_VAL)
+    errno = ERANGE;
+  else /* no error */
+    errno = 0;
+
+  /* Set The endptr */
+  if (endptr != NULL)
+    *endptr = p;
+
+  return sign == 1 ?  val : -val;
+}
+
+
+/**
+ * g_local_strtoull:
+ * @nptr:    the string to convert to a numeric value.
+ * @endptr:  if non-%NULL, it returns the character after
+ *           the last character used in the conversion.
+ * @base:     to be used for the conversion, 2..10 or 0
+ *
+ * Converts a local string to a #guint64 value.
+ * It will use the local number system to convert to convert local 
+ * string to number. Local number system information is gathered from available
+ * translations for '0', '+', '-', '.', and 'e'.
+ *
+ * This function is useful for software internationalization. This functions is
+ * not able to read the default English numbers if there is a non-english translation 
+ * available for your locale. It can be called inside #g_strtoull function to make it 
+ * work for internationalized numbers.
+ *
+ * Return value: the #guint64 value.
+ **/
+guint64
+g_local_strtoull (const gchar	*nptr,
+	          gchar        **endptr,
+	          guint          base )
+{
+  g_return_val_if_fail (nptr != NULL, 0);
+  
+  if (base == 0)
+    base = 10;
+
+  if (base < 2 || base > 10)
+    errno = EINVAL;
+  g_return_val_if_fail (base >= 2 && base <= 10, 0);
+
+  guint64 val = 0;
+  gboolean read_flag = FALSE;
+  
+  gchar *p = nptr;
+  gunichar c = g_utf8_get_char_validated (p, -1); /* c always is the first character of p */
+
+  /* Skip Spaces in the beginning */
+  while (g_unichar_isspace (c))
+    {
+      p = g_utf8_next_char (p);
+      c = g_utf8_get_char_validated (p, -1);
+    }
+
+  /* Read the Sign */
+  gchar *positive_signs = get_local_positive_str ();
+  gchar *negative_signs = get_local_negative_str ();
+
+  gint sign = 1;
+  if (c != 0 && g_utf8_strchr (positive_signs, -1, c) != NULL)
+    {
+      p = g_utf8_next_char (p);
+      c = g_utf8_get_char_validated (p, -1);
+    }
+  else if (c != 0 && g_utf8_strchr (negative_signs, -1, c) != NULL)
+    {
+      sign = -1;
+      p = g_utf8_next_char (p);
+      c = g_utf8_get_char_validated (p, -1);
+    }
+
+  /* Read the numbers */
+  gunichar zero = get_local_zero_char ();
+  gboolean overflow = FALSE;
+
+  while (c >= zero && c < zero + base)
+    {
+      gint num = c - zero;
+      read_flag = TRUE;
+      if (!overflow && (G_MAXUINT64 - num) / base >= val) /* avoid overflow */
+	val = base * val + num;
+      else
+	overflow = TRUE;
+
+      p = g_utf8_next_char (p);
+      c = g_utf8_get_char_validated (p, -1);
+    }
+
+  /* If no number is read 0 should be returned */
+  if (read_flag == FALSE)
+    {
+      /* Standard requires endptr, errno, Return value to be as followed */
+      if (endptr != NULL)
+	*endptr = nptr;
+      errno = EINVAL;
+      return 0;
+    } 
+
+  if (endptr != NULL)
+    *endptr = p;
+
+  if (overflow)
+    {
+      errno = ERANGE;
+      return G_MAXUINT64;
+    }
+
+  if (sign == -1 && val > G_MAXINT64)
+    {
+      errno = ERANGE;
+      return val;
+    }
+  else
+    {
+      errno = 0;
+      return sign == 1 ? val : -val;
+    }
+}
+
+/**
+ * g_local_strtoll:
+ * @nptr:    the string to convert to a numeric value.
+ * @endptr:  if non-%NULL, it returns the character after
+ *           the last character used in the conversion.
+ * @base:     to be used for the conversion, 2..10 or 0
+ *
+ * Converts a local string to a #gint64 value.
+ * It will use the local number system to convert to convert local 
+ * string to number. Local number system information is gathered from available
+ * translations for '0', '+', '-', '.', and 'e'.
+ *
+ * This function is usefull for software internationalization. This functions is
+ * not able to read the default english numbers if there is a non-english translation 
+ * available for your locale. It can be called inside #g_strtoll function to make it 
+ * work for internationalized numbers.
+ *
+ * Return value: the #gint64 value.
+ **/
+gint64
+g_local_strtoll (const gchar* nptr,
+	         gchar       **endptr,
+		 guint         base)
+{
+  g_return_val_if_fail (nptr != NULL, 0);
+
+  if (base == 0)
+    base = 10;
+
+  if (base < 2 || base > 10)
+    errno = EINVAL;
+  g_return_val_if_fail (base >= 2 && base <= 10, 0);
+
+  gboolean read_flag = FALSE;
+  gint64 val = 0;
+  
+  gchar *p = nptr;
+  gunichar c = g_utf8_get_char_validated (p, -1); /* c always is the first character of p */
+
+  /* Skip Spaces in the beginning */
+  while (g_unichar_isspace (c))
+    {
+      p = g_utf8_next_char (p);
+      c = g_utf8_get_char_validated (p, -1);
+    }
+
+  /* Read the sign */
+  gchar *positive_signs = get_local_positive_str ();
+  gchar *negative_signs = get_local_negative_str ();
+
+  gint sign = 1;
+  if (c != 0 && g_utf8_strchr (positive_signs, -1, c) != NULL)
+  {
+    p = g_utf8_next_char (p);
+    c = g_utf8_get_char_validated (p, -1);
+  }
+  else if (c != 0 && g_utf8_strchr (negative_signs, -1, c) != NULL)
+    {
+      sign = -1;
+      p = g_utf8_next_char (p);
+      c = g_utf8_get_char_validated (p, -1);
+    }
+
+  gunichar zero = get_local_zero_char ();
+
+  gboolean overflow = FALSE;
+
+  while (c >= zero && c < zero + base)
+    {
+      gint num = c - zero;
+      read_flag = TRUE;
+      if (!overflow)
+	{
+	  if ((sign == 1 && (G_MAXINT64 - num) / base >= val) ||  /* avoid overflow */
+	     (sign == -1 && (G_MININT64 + num) / base <= -val))   /* avoid underflow */
+	    val = base * val + num;
+	  else
+	    overflow = TRUE;
+	}
+      p = g_utf8_next_char (p);
+      c = g_utf8_get_char_validated (p, -1);
+    }
+
+  if (read_flag == FALSE)
+    {
+      /* Standard requires endptr, errno, Return value to be as followed */
+      if (endptr != NULL)
+	*endptr = nptr;
+      errno = EINVAL;
+      return 0;
+    } 
+
+  if (endptr != NULL)
+    *endptr = p;
+
+  if (overflow)
+    {
+      errno = ERANGE;
+      return (sign == 1 ? G_MAXINT64: G_MININT64);
+    }
+
+  errno = 0;
+  return sign == 1 ?  val : -val;
+}
+
 /**
  * g_strtod:
  * @nptr:    the string to convert to a numeric value.
@@ -251,7 +742,8 @@
  * Converts a string to a #gdouble value.
  * It calls the standard strtod() function to handle the conversion, but
  * if the string is not completely converted it attempts the conversion
- * again with g_ascii_strtod(), and returns the best match.
+ * again with g_ascii_strtod(), again if the conversion is not complete
+ * it will use g_local_strtod(), and returns the best match.
  *
  * This function should seldomly be used. The normal situation when reading
  * numbers not for human consumption is to use g_ascii_strtod(). Only when
@@ -268,28 +760,148 @@
 {
   gchar *fail_pos_1;
   gchar *fail_pos_2;
+  gchar *fail_pos_3;
   gdouble val_1;
   gdouble val_2 = 0;
+  gdouble val_3 = 0;
 
   g_return_val_if_fail (nptr != NULL, 0);
 
   fail_pos_1 = NULL;
   fail_pos_2 = NULL;
+  fail_pos_3 = NULL;
 
   val_1 = strtod (nptr, &fail_pos_1);
 
   if (fail_pos_1 && fail_pos_1[0] != 0)
-    val_2 = g_ascii_strtod (nptr, &fail_pos_2);
+    {
+      val_2 = g_ascii_strtod (nptr, &fail_pos_2);
+      if (fail_pos_2 && fail_pos_2[0] != 0)
+	val_3 = g_local_strtod (nptr, &fail_pos_3);
+    }
 
-  if (!fail_pos_1 || fail_pos_1[0] == 0 || fail_pos_1 >= fail_pos_2)
+  if (!fail_pos_1 || fail_pos_1[0] == 0 || 
+     (fail_pos_1 >= fail_pos_2 && fail_pos_1 >= fail_pos_3))
     {
       if (endptr)
 	*endptr = fail_pos_1;
       return val_1;
     }
+  else if (!fail_pos_2 || fail_pos_2[0] == 0 || fail_pos_2 >= fail_pos_3)
+    {
+      if (endptr)
+	*endptr = fail_pos_2;
+      return val_2;
+    }
   else
     {
       if (endptr)
+	*endptr = fail_pos_3;
+      return val_3;
+    }
+}
+
+/**
+ * g_strtoull:
+ * @nptr:    the string to convert to a numeric value.
+ * @endptr:  if non-%NULL, it returns the character after
+ *           the last character used in the conversion.
+ * @base:     to be used for the conversion, 2..10 or 0
+ *
+ * Converts a string to a #guint64 value.
+ * It calls the standard strtoull function to handle the conversion 
+ * buf if the string is not completely converted it attempts the 
+ * conversion again with g_local_strtoull(), and returns the best match.
+ *
+ * This function is useful for software internationalization. But of course
+ * there is a cost for second call if the number is not fully converted. This
+ * function is recommended to use when reading information from 
+ * internationalized UI.
+ *
+ * Return value: the #guint64 value.
+ **/
+guint64
+g_strtoull (const gchar *nptr,
+	    gchar       **endptr,
+	    guint	  base)
+{
+  gchar *fail_pos_1;
+  gchar *fail_pos_2;
+  guint64 val_1;
+  guint64 val_2 = 0;
+
+  g_return_val_if_fail (nptr != NULL, 0);
+
+  fail_pos_1 = NULL;
+  fail_pos_2 = NULL;
+
+  val_1 = strtoull (nptr, &fail_pos_1, base);
+
+  if (fail_pos_1 && fail_pos_1[0] != 0)
+      val_2 = g_local_strtoull (nptr, &fail_pos_2, base);
+
+  if (!fail_pos_1 || fail_pos_1[0] == 0 || fail_pos_1 >= fail_pos_2)
+    {
+      if (endptr)
+        *endptr = fail_pos_1;
+      return val_1;
+    }
+  else 
+    {
+      if (endptr)
+	*endptr = fail_pos_2;
+      return val_2;
+    }
+}
+
+/**
+ * g_strtoll:
+ * @nptr:    the string to convert to a numeric value.
+ * @endptr:  if non-%NULL, it returns the character after
+ *           the last character used in the conversion.
+ * @base:     to be used for the conversion, 2..10 or 0
+ *
+ * Converts a string to a #gint64 value.
+ * It calls the standard strtoull function to handle the conversion 
+ * buf if the string is not completely converted it attempts the 
+ * conversion again with g_local_strtoll(), and returns the best match.
+ *
+ * This function is usefull for software internationalization. But of course
+ * there is a cost for second call if the number is not fully converted. This
+ * function is recommended to use when reading information from 
+ * internationalized UI.
+ *
+ * Return value: the #gint64 value.
+ **/
+gint64
+g_strtoll (const gchar* nptr,
+	   gchar       **endptr,
+	   guint         base)
+{
+  gchar *fail_pos_1;
+  gchar *fail_pos_2;
+  gint64 val_1;
+  gint64 val_2 = 0;
+
+  g_return_val_if_fail (nptr != NULL, 0);
+
+  fail_pos_1 = NULL;
+  fail_pos_2 = NULL;
+
+  val_1 = strtoll (nptr, &fail_pos_1, base);
+
+  if (fail_pos_1 && fail_pos_1[0] != 0)
+      val_2 = g_local_strtoll (nptr, &fail_pos_2, base);
+
+  if (!fail_pos_1 || fail_pos_1[0] == 0 || fail_pos_1 >= fail_pos_2)
+    {
+      if (endptr)
+	*endptr = fail_pos_1;
+      return val_1;
+    }
+  else 
+    {
+      if (endptr)
 	*endptr = fail_pos_2;
       return val_2;
     }
@@ -475,6 +1087,294 @@
   return val;
 }
 
+/**
+ * g_dtostr:
+ * @buffer: A buffer to place the resulting string in
+ * @buf_len: The length of the buffer.
+ * @d: The #gdouble to convert
+ *
+ * Converts a #gdouble to a string, using the '.' as
+ * decimal point.
+ *
+ * This functions generates enough precision that converting
+ * the string back using g_strtod() gives the same machine-number
+ * (on machines with IEEE compatible 64bit doubles). It is
+ * guaranteed that the size of the resulting string will never
+ * be larger than @G_DTOSTR_BUF_SIZE bytes.
+ *
+ * Return value: The pointer to the buffer with the converted string.
+ **/
+gchar *
+g_dtostr (gchar       *buffer,
+          gint         buf_len,
+          gdouble      d)
+{
+  return g_formatd (buffer, buf_len, "%.17g", d);
+}
+
+/**
+ * g_ulltostr:
+ * @buffer: A buffer to place the resulting string in
+ * @buf_len: The length of the buffer.
+ * @ull: The #guint64 to convert
+ *
+ * Converts a #guint64 to a string
+ *
+ * It is guaranteed that the size of the resulting string will never
+ * be larger than @G_ITOSTR_BUF_SIZE bytes.
+ *
+ * Return value: The pointer to the buffer with the converted string.
+ **/
+gchar *
+g_ulltostr (gchar       *buffer,
+	    gint         buf_len,
+	    guint64      ull)
+{
+  return g_formati (buffer, buf_len, "%llu", ull);
+}
+
+/**
+ * g_lltostr:
+ * @buffer: A buffer to place the resulting string in
+ * @buf_len: The length of the buffer.
+ * @ll: The #gint64 to convert
+ *
+ * Converts a #gint64 to a string, using the '.' as
+ * decimal point.
+ *
+ * This functions generates enough precision that converting
+ * the string back using g_strtod() gives the same machine-number
+ * (on machines with IEEE compatible 64bit doubles). It is
+ * guaranteed that the size of the resulting string will never
+ * be larger than @G_ITOSTR_BUF_SIZE bytes.
+ *
+ * Return value: The pointer to the buffer with the converted string.
+ **/
+gchar *
+g_lltostr (gchar       *buffer,
+	   gint         buf_len,
+	   gint64       ll)
+{
+  return g_formati (buffer, buf_len, "%lld", ll);
+}
+
+/**
+ * g_formati:
+ * @buffer: A buffer to place the resulting string in
+ * @buf_len: The length of the buffer.
+ * @format: The printf()-style format to use for the
+ *          code to use for converting.
+ * @i: The #guint64 or #gint64 to convert
+ *
+ * Converts a #guint64 or #gint64 to a string, using the current locale
+ * To format the number you pass in a printf()-style format 
+ * string. Allowed conversion specifiers are 'u', 'U', 'i', 'I', 'd', and 'D'.
+ *
+ * If you just want to want to serialize the value into a
+ * string, use g_lltostr() or g_ulltostr.
+ *
+ * Return value: The pointer to the buffer with the converted string.
+ **/
+gchar *
+g_formati (gchar          *buffer,
+	   gint            buf_len,
+	   const gchar    *format,
+	   gint64          ll)
+{
+  gchar format_char;
+
+  g_return_val_if_fail (buffer != NULL, NULL);
+  g_return_val_if_fail (format[0] == '%', NULL);
+  g_return_val_if_fail (strpbrk (format + 1, "'%") == NULL, NULL);
+
+  format_char = format[strlen (format) - 1];
+
+  g_return_val_if_fail (format_char == 'u' || format_char == 'U' ||
+	                format_char == 'd' || format_char == 'D' ||
+	                format_char == 'i' || format_char == 'I',
+	                NULL);
+
+  if (format[0] != '%')
+    return NULL;
+
+  if (strpbrk (format + 1, "'%"))
+    return NULL;
+
+  if (!(format_char == 'u' || format_char == 'U' ||
+        format_char == 'd' || format_char == 'D' ||
+        format_char == 'i' || format_char == 'I')
+)
+    return NULL;
+
+  gchar temp_buffer[G_ASCII_ITOSTR_BUF_SIZE];
+  snprintf (temp_buffer, G_ASCII_ITOSTR_BUF_SIZE, format, ll);
+
+  return g_get_local_number(temp_buffer, buffer, buf_len);
+}
+
+/**
+ * g_get_local_number:
+ * @english: A String with 
+ * @buffer: A buffer to place the resulting string in
+ * @buf_len: The length of the buffer.
+ *
+ * Converts a English numeric string to a local numeric string.
+ *
+ * This functions generates acts assuming that a correct number is 
+ * given and does not check for syntax. Just converts '+', '-', 
+ * numbers, and 'e' to local ones, guaranteed that the size of the resulting 
+ * local string will never be larger than @buf_len bytes.
+ *
+ * Return value: The pointer to the buffer with the converted string.
+ **/
+gchar *
+g_get_local_number (gchar       *english,
+	            gchar       *buffer,
+	            gint         buf_len)
+{
+
+  g_return_val_if_fail (english != NULL, NULL);
+  g_return_val_if_fail (buffer != NULL, NULL);
+
+  gchar *p1 = english;
+  gchar *p2 = buffer;
+
+  gunichar positive_sign = get_local_positive_char ();
+  gunichar negative_sign = get_local_negative_char ();
+  gunichar zero = get_local_zero_char ();
+  gunichar decimal_point = get_local_decimal_point_char ();
+  gchar *exp = get_local_exp_str ();
+
+  while (*p1)
+    {
+      gint len;
+      if (*p1 == '+')
+	{
+	  len = g_unichar_to_utf8 (positive_sign, NULL);
+	  if (len > buf_len)
+	    goto buffer_full;
+
+	  g_unichar_to_utf8 (positive_sign, p2);
+	  p2 += len;
+	  buf_len -= len;
+	  p1++;
+	}
+      else if (*p1 == '-')
+	{
+	  len = g_unichar_to_utf8 (negative_sign, NULL);
+	  if (len > buf_len)
+	    goto buffer_full;
+
+	  g_unichar_to_utf8 (negative_sign, p2);
+	  p2 += len;
+	  buf_len -= len;
+	  p1++;
+	}
+      else if (isdigit ((guchar)*p1))
+	{
+	  gunichar digit = zero + *p1 - '0';
+	  len = g_unichar_to_utf8 (digit, NULL);
+	  if (len > buf_len)
+	    goto buffer_full;
+
+	  g_unichar_to_utf8 (digit, p2);
+	  p2 += len;
+	  buf_len -= len;
+	  p1++;
+	}
+      else if (*p1 == '.')
+	{
+	  len = g_unichar_to_utf8 (decimal_point, NULL);
+	  if (len > buf_len)
+	    goto buffer_full;
+
+	  g_unichar_to_utf8 (decimal_point, p2);
+	  p2 += len;
+	  buf_len -= len;
+	  p1++;
+	}
+      else if (*p1 == 'e' || *p1 == 'E')
+	{
+	  len = strlen (exp);
+	  if (len > buf_len)
+	    goto buffer_full;
+
+	  strcpy (p2, exp);
+	  p2 += len;
+	  buf_len -= len;
+	  ++p1;
+	}
+      else
+	{
+	  len = 1;
+	  if (len > buf_len)
+	    goto buffer_full;
+
+	  *p2 = *p1;
+	  p2 += len;
+	  buf_len -= len;
+	  ++p1;
+	}
+    }
+
+buffer_full:
+  *p2 = '\0';
+  return buffer;
+}
+
+/**
+ * g_formatd:
+ * @buffer: A buffer to place the resulting string in
+ * @buf_len: The length of the buffer.
+ * @format: The printf()-style format to use for the
+ *          code to use for converting.
+ * @d: The #gdouble to convert
+ *
+ * Converts a #gdouble to a string, using the current locale
+ * To format the number you pass in a printf()-style format 
+ * string. Allowed conversion specifiers are 'e', 'E', 
+ * 'f', 'F', 'g' and 'G'.
+ *
+ * If you just want to want to serialize the value into a
+ * string, use g_dtostr().
+ *
+ * Return value: The pointer to the buffer with the converted string.
+ **/
+gchar *
+g_formatd (gchar          *buffer,
+	   gint           buf_len,
+	   const gchar    *format,
+	   gdouble        d)
+{
+  gchar format_char;
+
+  g_return_val_if_fail (buffer != NULL, NULL);
+  g_return_val_if_fail (format[0] == '%', NULL);
+  g_return_val_if_fail (strpbrk (format + 1, "'l%") == NULL, NULL);
+
+  format_char = format[strlen (format) - 1];
+
+  g_return_val_if_fail (format_char == 'e' || format_char == 'E' ||
+	                format_char == 'f' || format_char == 'F' ||
+	                format_char == 'g' || format_char == 'G',
+	                NULL);
+
+  if (format[0] != '%')
+    return NULL;
+
+  if (strpbrk (format + 1, "'l%"))
+    return NULL;
+
+  if (!(format_char == 'e' || format_char == 'E' ||
+	format_char == 'f' || format_char == 'F' ||
+	format_char == 'g' || format_char == 'G'))
+    return NULL;
+
+  gchar temp_buffer[G_ASCII_DTOSTR_BUF_SIZE];
+  snprintf (temp_buffer, G_ASCII_DTOSTR_BUF_SIZE, format, d);
+
+  return g_get_local_number (temp_buffer, buffer, buf_len);
+}
 
 /**
  * g_ascii_dtostr:
--- ./glib/gstrfuncs.h.intl_numbers	2006-05-16 10:16:36.000000000 +0430
+++ ./glib/gstrfuncs.h	2006-09-26 11:29:15.000000000 +0330
@@ -29,6 +29,7 @@
 
 #include <stdarg.h>
 #include <glib/gtypes.h>
+#include "gunicode.h"
 
 G_BEGIN_DECLS
 
@@ -125,6 +126,13 @@
 
 gdouble	              g_strtod         (const gchar  *nptr,
 					gchar	    **endptr);
+guint64               g_strtoull       (const gchar  *nptr,
+					gchar       **endptr,
+					guint         base);
+gint64                g_strtoll        (const gchar  *nptr,
+					gchar       **endptr,
+					guint         base);
+
 gdouble	              g_ascii_strtod   (const gchar  *nptr,
 					gchar	    **endptr);
 guint64		      g_ascii_strtoull (const gchar *nptr,
@@ -133,10 +141,39 @@
 gint64		      g_ascii_strtoll  (const gchar *nptr,
 					gchar      **endptr,
 					guint        base);
+gdouble                     g_local_strtod   (const gchar  *nptr,
+					gchar       **endptr);
+guint64               g_local_strtoull (const gchar  *nptr,
+					gchar       **endptr,
+					guint         base);
+gint64                      g_local_strtoll  (const gchar  *nptr,
+					gchar       **endptr,
+					guint         base);
+
+/* These function are used to get numbering local information */
+gchar * 	      get_local_zero_str ();
+gchar *               get_local_positive_str ();
+gchar *               get_local_negative_str ();
+gchar *               get_local_decimal_point_str ();
+gchar *               get_local_exp_str ();
+gunichar              get_local_zero_char ();
+gunichar              get_local_positive_char ();
+gunichar              get_local_negative_char ();
+gunichar              get_local_decimal_point_char ();
+
 /* 29 bytes should enough for all possible values that
  * g_ascii_dtostr can produce.
  * Then add 10 for good measure */
 #define G_ASCII_DTOSTR_BUF_SIZE (29 + 10)
+
+#define G_ASCII_ITOSTR_BUF_SIZE (22 + 10)
+
+/* 1 * 2 sign + 16 * 2 digs + 1 * 2 radix + 8 for 'e' + 1 * 2 sign + 2 * 3 exp + 1 null + safety = 60 */
+#define G_DTOSTR_BUF_SIZE 60
+
+/* 1 * 2 sign + 20 * 2 digs + 1 null + safety = 60 */
+#define G_ITOSTR_BUF_SIZE 60
+
 gchar *               g_ascii_dtostr   (gchar        *buffer,
 					gint          buf_len,
 					gdouble       d);
@@ -145,6 +182,28 @@
 					const gchar  *format,
 					gdouble       d);
 
+gchar *               g_dtostr         (gchar        *buffer,
+					gint          buf_len,
+					gdouble       d);
+gchar *               g_formatd        (gchar        *buffer,
+					gint          buf_len,
+					const gchar  *format,
+					gdouble       d);
+
+gchar *               g_ulltostr       (gchar        *buffer,
+					gint          buf_len,
+					guint64       ull);
+gchar *               g_lltostr        (gchar        *buffer,
+					gint          buf_len,
+					gint64        ll);
+gchar *               g_formati        (gchar        *buffer,
+					gint          buf_len,
+					const gchar  *format,
+					gint64        ll);
+gchar *               g_get_local_number(gchar       *english,
+					 gchar       *buffer,
+					 gint         buf_len);
+
 /* removes leading spaces */
 gchar*                g_strchug        (gchar        *string);
 /* removes trailing spaces */
--- ./glib/glib.symbols.intl_numbers	2006-06-02 07:06:30.000000000 +0430
+++ ./glib/glib.symbols	2006-09-26 11:29:15.000000000 +0330
@@ -1024,6 +1024,23 @@
 g_ascii_xdigit_value G_GNUC_CONST
 g_ascii_strcasecmp
 g_ascii_strncasecmp
+g_dtostr
+g_formatd
+g_formati
+g_get_local_number PRIVATE
+g_lltostr
+get_local_zero_str PRIVATE
+get_local_positive_str PRIVATE
+get_local_negative_str PRIVATE
+get_local_decimal_point_str PRIVATE
+get_local_exp_str PRIVATE
+get_local_zero_char PRIVATE
+get_local_positive_char PRIVATE
+get_local_negative_char PRIVATE
+get_local_decimal_point_char PRIVATE
+g_local_strtod
+g_local_strtoll
+g_local_strtoull
 g_memdup G_GNUC_MALLOC
 g_stpcpy
 g_strcanon
@@ -1055,6 +1072,8 @@
 g_strsplit_set G_GNUC_MALLOC
 g_strstr_len
 g_strtod
+g_strtoll
+g_strtoull
 #ifndef G_DISABLE_DEPRECATED
 g_strcasecmp
 g_strncasecmp
@@ -1063,6 +1082,7 @@
 #endif
 g_strv_length
 g_strip_context
+g_ulltostr
 #endif
 #endif
 
