legacy-knowledge-base
公開されました Jun. 30, 2025

言語オーバーライドは、不正な文字エンコーディングでエントリを保存します。

written-by

Daniel Carrillo Broeder

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

legacy-article

learn-legacy-article-disclaimer-text

問題

  • ウムラウト、アクセント記号、またはその他の特殊文字を含む言語キーを、コントロールパネル→設定→言語オーバーライドで編集または作成すると、値にエンコードエラーが表示され、正しく保存されません。
  • 例えば、"Válido "は "VÃlido "として保存できる:

2024-05-24_13-17.png

環境

  • 四半期ごとのリリース

解像度

  • この問題は、PortalUtil.getUser()またはPortalUtil.getUserId()を呼び出すカスタムFilterがデプロイされると発生します。
  • この問題を解決するには、2つの選択肢がある:
    1. サーブレットフィルターに"after-filter=Absolute Redirects Filter "プロパティを追加する。
    2. PortalUtil メソッドを呼び出す前に一度、httpServletRequest.setCharacterEncoding("UTF-8");を追加して、リクエストの文字セット・エンコードをUTF-8に設定します。

追加情報

did-this-article-resolve-your-issue

legacy-knowledge-base