diff --git a/l10n_community/l10n_community.install b/l10n_community/l10n_community.install
index eb455cd..ce27b02 100644
--- a/l10n_community/l10n_community.install
+++ b/l10n_community/l10n_community.install
@@ -574,3 +574,13 @@ function l10n_community_update_6024() {
   db_add_index($ret, 'l10n_server_file', 'pid', array('pid'));
   return $ret;
 }
+
+/**
+ * Convert line break from CR or CRLF to LF.
+ */
+function l10n_community_update_6025() {
+  $ret = array();
+  $ret[] = update_sql("UPDATE {l10n_server_translation} SET translation = REPLACE(translation, '\r\n', '\n')");
+  $ret[] = update_sql("UPDATE {l10n_server_translation} SET translation = REPLACE(translation, '\r', '\n')");
+  return $ret;
+}
\ No newline at end of file
diff --git a/l10n_community/l10n_community.module b/l10n_community/l10n_community.module
index 3157151..d5026ac 100644
--- a/l10n_community/l10n_community.module
+++ b/l10n_community/l10n_community.module
@@ -557,6 +557,9 @@ function l10n_community_get_contexts() {
  */
 function l10n_community_trim($translation, $source) {
   if (is_string($translation) && is_string($source)) {
+    // Convert line break from CR or CRLF to LF.
+    $translation = str_replace(array("\r\n", "\r"), "\n", $translation);
+
     $matches = array();
     preg_match("/^(\s*).*\S(\s*)\$/s", $source, $matches);
     return $matches[1] . trim($translation) . $matches[2];
