- android - RelativeLayout 背景可绘制重叠内容
- android - 如何链接 cpufeatures lib 以获取 native android 库?
- java - OnItemClickListener 不起作用,但 OnLongItemClickListener 在自定义 ListView 中起作用
- java - Android 文件转字符串
为什么 setlocale(LC_ALL, 'en_GB.UTF8');
在 Windows Server 2003 R2 - Zend CE PHP 5.3.5 上返回 false?
有问题的功能:setlocale
.
最佳答案
来自 PHP 手册:
The return value of
setlocale()
depends on the system that PHP is running. It returns exactly what the system setlocale function returns.
因此在您的情况下它返回 false,因为系统返回 false。您正在使用的语言环境可能在您的系统上不可用。
列表setlocale
Windows 支持的字符串可用 here .对于英式英语,您需要 eng
, english-uk
, 或 uk
. Windows 不支持像 UTF-8 这样的多字节字符集;你可能最终会得到 Windows-1252。
关于php - setlocale(LC_ALL, 'en_GB.UTF8') 不适用于 Windows,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9489339/
在使用 money_format() 等函数时,PHP 中的 setlocale() 出现问题。 在我的本地主机中,只有当我的 setlocale() 值为 en_GB 时,此类函数才有效。但是,在我
Java.util.Locale 返回英国的“en_GB”区域设置格式。当我在此 Date.toLocaleString() 函数中使用相同的语言环境时,该函数返回 Invalid language
当我尝试在 eclipse 项目中使用 java.util.Locale 时出现错误: $Can't find bundle for base name i18n, locale en_GB Exce
尝试使用以下方法更改 Nougat 中的应用程序语言,但失败了。 config.setLocales(new LocaleList(locale)); getBaseContext().createC
在我的 Spring Boot 应用程序中,我收到消息:org.springframework.context.NoSuchMessageException:在语言环境“en_GB”的代码“inval
如何根据本地代码(即 en_GB、en_AG、de_DE)设置价格格式。最好有 Angular 。 示例: {{4950.00|localCurrency:en_GB}} : displays : £
我在 jsp 中使用英国设置默认区域设置,但它没有反射(reflect)。为什么会这样呢?还有其他方法可以做到这一点吗?或者我可以从 Java 端做到这一点吗? 感谢您的回复 最佳答案 您需要调用 之
关闭。这个问题不满足Stack Overflow guidelines .它目前不接受答案。 想改善这个问题吗?更新问题,使其成为 on-topic对于堆栈溢出。 5年前关闭。 Improve thi
我正在使用 codeigniter 将数据从我的页面插入数据库,但出现此错误 A Database Error Occurred Error Number: 1062Duplicate
为什么 setlocale(LC_ALL, 'en_GB.UTF8'); 在 Windows Server 2003 R2 - Zend CE PHP 5.3.5 上返回 false? 有问题的功能:
这适用于 Java 11 但不适用于 Java 17 DateTimeFormatter format = DateTimeFormatter.ofPattern("MMM dd, yyyy")
在我的 spring-servlet.xml 我有 我的messages.properties 文件在我的WEB-INF/classes 里面,它被命名为messages_EN.prop
当我在扩展 ListResourceBundle 类的同一个包中创建一个 ResBundle 类时,我收到以下异常。 java.util.MissingResourceException: Can't
使用 Windows PostgreSQL 终端连接到同一个数据库,我们在两台不同的机器上得到不同语言的响应(一台中文,一台英文)。我无法弄清楚这两台机器的设置有什么不同来修复它。特别值得注意的是,几
事实证明,使用 ww 作为 java 日期格式字符串的一年中的星期为 2011 年 1 月 1 日的 52,当时语言环境为 en_GB。这是证明(使用 scala REPL,尽管我可以使用 Java
我有一个小型 Android 应用程序,用于根据区域设置以不同格式打印特定日期。 这是我的代码(使用 java.text.DateFormat): Locale[] locales = {new Lo
我是一名优秀的程序员,十分优秀!