International sorting problem (should be marked Plug-in..)

International sorting problem (should be marked Plug-in..)

BjornHaBjornHa Posts: 49Questions: 7Answers: 0
edited 9:41AM in DataTables 2

Have a problem getting sorting to work with swedish collation.

Loaded components:

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-icons/1.11.3/font/bootstrap-icons.min.css" integrity="sha512-dPXYcDub/aeb08c63jRq/k6GaKccl256JQy/AnOq7CAnEZ9FzSL9wSbcZkMp4R26vBsMLFYH4kQ67/bbV8XaCQ==" crossorigin="anonymous" referrerpolicy="no-referrer" />
<script type="text/javascript" charset="utf-8" src="<?php echo $CDNsite; ?>js/loadingoverlay.min.js"></script>
<link href="<?php echo $CDNsite; ?>bootstrap/bootstrap5.css" media="all" rel="stylesheet" type="text/css" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.3/js/bootstrap.bundle.min.js" integrity="sha512-7Pi/otdlbbCR+LnW+F7PwFcSDJOuUJB3OxtEHbg4vSMvzvJjde4Po1v4BR9Gdc9aXNUNFVUY+SK51wWT8WF0Gg==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>

<script src="<?php echo $CDNsite; ?>js/jquery-validation-1.15.0/dist/jquery.validate.min.js"></script>
<script src="<?php echo $CDNsite; ?>js/jquery-validation-1.15.0/dist/additional-methods.min.js"></script>

<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.2.7/pdfmake.min.js" integrity="sha384-VFQrHzqBh5qiJIU0uGU5CIW3+OWpdGGJM9LBnGbuIH2mkICcFZ7lPd/AAtI7SNf7" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.2.7/vfs_fonts.js" integrity="sha384-/RlQG9uf0M2vcTw3CX7fbqgbj/h8wKxw7C3zu9/GxcBPRKOEcESxaxufwRXqzq6n" crossorigin="anonymous"></script>

<link href="https://cdn.datatables.net/v/bs5/jszip-3.10.1/dt-2.3.1/b-3.2.3/b-html5-3.2.3/b-print-3.2.3/date-1.5.5/fc-5.0.4/kt-2.12.1/rg-1.5.1/sc-2.4.3/sb-1.8.2/sp-2.3.3/sl-3.0.0/datatables.min.css" rel="stylesheet" integrity="sha384-dmJwGoQKRiGOQiZJe6kYz4UbhBnjGPhldG5jT6To7GRFEXTWOn9uO4DBuJeWgcUO" crossorigin="anonymous">
<link rel="stylesheet" type="text/css" href="<?php echo $CDNsite; ?>css/editor.bootstrap5.min.css" />
<script src="https://cdn.datatables.net/v/bs5/jszip-3.10.1/dt-2.3.1/b-3.2.3/b-html5-3.2.3/b-print-3.2.3/date-1.5.5/fc-5.0.4/kt-2.12.1/rg-1.5.1/sc-2.4.3/sb-1.8.2/sp-2.3.3/sl-3.0.0/datatables.min.js" integrity="sha384-KggY2N05IO+bjnc6diXyG5PXRuCAZ6PvWCOPeqOnANVouhP1/jYPKfjxOTZvnxlR" crossorigin="anonymous"></script>

<script src="https://cdn.datatables.net/plug-ins/2.0.7/sorting/formatted-numbers.js"></script>
<script src="https://cdn.datatables.net/plug-ins/2.3.1/sorting/intl.js"></script>

<script type="text/javascript" charset="utf-8" src="<?php echo $CDNsite; ?>js/dataTables.editor.min.js"></script>
<script type="text/javascript" charset="utf-8" src="<?php echo $CDNsite; ?>js/editor.bootstrap5.min.js"></script>

<link href="https://cdn.jsdelivr.net/gh/kartik-v/bootstrap-star-rating@4.1.2/css/star-rating.css" media="all" rel="stylesheet" type="text/css" />
<link href="https://cdn.jsdelivr.net/gh/kartik-v/bootstrap-star-rating@4.1.2/themes/krajee-svg/theme.css" media="all" rel="stylesheet" type="text/css" />

<script src="https://cdn.jsdelivr.net/gh/kartik-v/bootstrap-star-rating@4.1.2/js/star-rating.js" type="text/javascript"></script>
<script src="https://cdn.jsdelivr.net/gh/kartik-v/bootstrap-star-rating@4.1.2/themes/krajee-svg/theme.js"></script>

Pages are loaded with <html lang="sv">
Table init:

DataTable.intlOrder();

var searchAppTable = $('#searchAppTable').DataTable({

I have tried with ('sv') in the call to intlOrder as well, no difference.
No testcase, but can provide login and page URL in PM

KR,
Björn H

Replies

  • allanallan Posts: 64,421Questions: 1Answers: 10,635 Site admin

    Yes, if you could message me login details, I'd need to see it. Could you also explain to be what the sorting should be?

    Thanks,
    Allan

  • BjornHaBjornHa Posts: 49Questions: 7Answers: 0

    PM sent

  • allanallan Posts: 64,421Questions: 1Answers: 10,635 Site admin

    For anyone else who finds this, the problem was caused by the new string-utf8 data type (which was a performance optimisation for ASCII data). The plugin didn't take account of that new type - this fix addresses the issue.

    The fix can be seen here: https://live.datatables.net/sifonaru/1/edit .

    Allan

Sign In or Register to comment.